mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-02-28 05:32:52 +00:00
🎨 API /api/query/sql add LIMIT clause https://github.com/siyuan-note/siyuan/issues/8167
This commit is contained in:
@@ -21,6 +21,7 @@ import (
|
||||
|
||||
"github.com/88250/gulu"
|
||||
"github.com/gin-gonic/gin"
|
||||
"github.com/siyuan-note/siyuan/kernel/model"
|
||||
"github.com/siyuan-note/siyuan/kernel/sql"
|
||||
"github.com/siyuan-note/siyuan/kernel/util"
|
||||
)
|
||||
@@ -35,7 +36,7 @@ func SQL(c *gin.Context) {
|
||||
}
|
||||
|
||||
stmt := arg["stmt"].(string)
|
||||
result, err := sql.Query(stmt)
|
||||
result, err := sql.Query(stmt, model.Conf.Search.Limit)
|
||||
if nil != err {
|
||||
ret.Code = 1
|
||||
ret.Msg = err.Error()
|
||||
|
||||
Reference in New Issue
Block a user