mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-21 09:00:12 +01:00
🎨 Add Relation and Rollup column to database table view https://github.com/siyuan-note/siyuan/issues/9888
This commit is contained in:
parent
87096f9671
commit
62e92c0e6b
3 changed files with 87 additions and 0 deletions
|
|
@ -26,6 +26,35 @@ import (
|
|||
"github.com/siyuan-note/siyuan/kernel/util"
|
||||
)
|
||||
|
||||
func searchAttributeView(c *gin.Context) {
|
||||
ret := gulu.Ret.NewResult()
|
||||
defer c.JSON(http.StatusOK, ret)
|
||||
|
||||
arg, _ := util.JsonArg(c, ret)
|
||||
if nil == arg {
|
||||
return
|
||||
}
|
||||
|
||||
keyword := arg["keyword"].(string)
|
||||
page := 1
|
||||
pageArg := arg["page"]
|
||||
if nil != pageArg {
|
||||
page = int(pageArg.(float64))
|
||||
}
|
||||
|
||||
pageSize := 10
|
||||
pageSizeArg := arg["pageSize"]
|
||||
if nil != pageSizeArg {
|
||||
pageSize = int(pageSizeArg.(float64))
|
||||
}
|
||||
|
||||
results, total := model.SearchAttributeView(keyword, page, pageSize)
|
||||
ret.Data = map[string]interface{}{
|
||||
"results": results,
|
||||
"total": total,
|
||||
}
|
||||
}
|
||||
|
||||
func renderSnapshotAttributeView(c *gin.Context) {
|
||||
ret := gulu.Ret.NewResult()
|
||||
defer c.JSON(http.StatusOK, ret)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue