mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-19 08:00:13 +01:00
🎨 Add Relation column to database table view https://github.com/siyuan-note/siyuan/issues/9888
This commit is contained in:
parent
fb72af192e
commit
072a55db7c
1 changed files with 9 additions and 0 deletions
|
|
@ -49,6 +49,7 @@ type SearchAttributeViewResult struct {
|
||||||
AvID string `json:"avID"`
|
AvID string `json:"avID"`
|
||||||
AvName string `json:"avName"`
|
AvName string `json:"avName"`
|
||||||
BlockID string `json:"blockID"`
|
BlockID string `json:"blockID"`
|
||||||
|
HPath string `json:"hPath"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func SearchAttributeView(keyword string, page int, pageSize int) (ret []*SearchAttributeViewResult, pageCount int) {
|
func SearchAttributeView(keyword string, page int, pageSize int) (ret []*SearchAttributeViewResult, pageCount int) {
|
||||||
|
|
@ -102,11 +103,19 @@ func SearchAttributeView(keyword string, page int, pageSize int) (ret []*SearchA
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var hPath string
|
||||||
|
baseBlock := treenode.GetBlockTreeRootByPath(node.Box, node.Path)
|
||||||
|
if nil != baseBlock {
|
||||||
|
hPath = baseBlock.HPath
|
||||||
|
}
|
||||||
|
|
||||||
if !exist {
|
if !exist {
|
||||||
ret = append(ret, &SearchAttributeViewResult{
|
ret = append(ret, &SearchAttributeViewResult{
|
||||||
AvID: avID,
|
AvID: avID,
|
||||||
AvName: attrView.Name,
|
AvName: attrView.Name,
|
||||||
BlockID: block.ID,
|
BlockID: block.ID,
|
||||||
|
HPath: hPath,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue