mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-20 16:40:13 +01:00
🎨 Add Rollup column to database table view https://github.com/siyuan-note/siyuan/issues/9958
This commit is contained in:
parent
50156a0dc9
commit
e29b674301
3 changed files with 78 additions and 0 deletions
|
|
@ -26,6 +26,42 @@ import (
|
|||
"github.com/siyuan-note/siyuan/kernel/util"
|
||||
)
|
||||
|
||||
func searchAttributeViewNonRelationKey(c *gin.Context) {
|
||||
ret := gulu.Ret.NewResult()
|
||||
defer c.JSON(http.StatusOK, ret)
|
||||
|
||||
arg, _ := util.JsonArg(c, ret)
|
||||
if nil == arg {
|
||||
return
|
||||
}
|
||||
|
||||
avID := arg["avID"].(string)
|
||||
keyword := arg["keyword"].(string)
|
||||
|
||||
nonRelationKeys := model.SearchAttributeViewNonRelationKey(avID, keyword)
|
||||
ret.Data = map[string]interface{}{
|
||||
"nonRelationKeys": nonRelationKeys,
|
||||
}
|
||||
}
|
||||
|
||||
func searchAttributeViewRelationKey(c *gin.Context) {
|
||||
ret := gulu.Ret.NewResult()
|
||||
defer c.JSON(http.StatusOK, ret)
|
||||
|
||||
arg, _ := util.JsonArg(c, ret)
|
||||
if nil == arg {
|
||||
return
|
||||
}
|
||||
|
||||
avID := arg["avID"].(string)
|
||||
keyword := arg["keyword"].(string)
|
||||
|
||||
relationKeys := model.SearchAttributeViewRelationKey(avID, keyword)
|
||||
ret.Data = map[string]interface{}{
|
||||
"relationKeys": relationKeys,
|
||||
}
|
||||
}
|
||||
|
||||
func getAttributeView(c *gin.Context) {
|
||||
ret := gulu.Ret.NewResult()
|
||||
defer c.JSON(http.StatusOK, ret)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue