This commit is contained in:
Liang Ding
2022-07-17 12:22:32 +08:00
parent c8ea858976
commit 505b973c2d
70 changed files with 671 additions and 942 deletions

View File

@@ -17,7 +17,7 @@
package sql
import (
"github.com/siyuan-note/siyuan/kernel/util"
"github.com/siyuan-note/logging"
)
type FileAnnotationRef struct {
@@ -36,14 +36,14 @@ func QueryRefIDsByAnnotationID(annotationID string) (refIDs, refTexts []string)
refIDs = []string{}
rows, err := query("SELECT block_id, content FROM file_annotation_refs WHERE annotation_id = ?", annotationID)
if nil != err {
util.LogErrorf("sql query failed: %s", err)
logging.LogErrorf("sql query failed: %s", err)
return
}
defer rows.Close()
for rows.Next() {
var id, content string
if err = rows.Scan(&id, &content); nil != err {
util.LogErrorf("query scan field failed: %s", err)
logging.LogErrorf("query scan field failed: %s", err)
return
}
refIDs = append(refIDs, id)