mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-16 22:50:13 +01:00
🎨 Improve block ref searching https://github.com/siyuan-note/siyuan/issues/12010
This commit is contained in:
parent
e652434858
commit
afcb666892
2 changed files with 4 additions and 4 deletions
|
|
@ -360,12 +360,11 @@ func QueryRefIDsByDefID(defID string, containChildren bool) (refIDs, refTexts []
|
|||
return
|
||||
}
|
||||
|
||||
func QueryRefsRecent(onlyDoc bool, ignoreLines []string) (ret []*Ref) {
|
||||
stmt := "SELECT * FROM refs AS r"
|
||||
func QueryRefsRecent(onlyDoc bool, typeFilter string, ignoreLines []string) (ret []*Ref) {
|
||||
stmt := "SELECT r.* FROM refs AS r, blocks AS b WHERE b.id = r.def_block_id AND b.type IN " + typeFilter
|
||||
if onlyDoc {
|
||||
stmt = "SELECT r.* FROM refs AS r, blocks AS b WHERE b.type = 'd' AND b.id = r.def_block_id"
|
||||
}
|
||||
stmt += " WHERE 1 = 1"
|
||||
if 0 < len(ignoreLines) {
|
||||
// Support ignore search results https://github.com/siyuan-note/siyuan/issues/10089
|
||||
buf := bytes.Buffer{}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue