反链面板

This commit is contained in:
Liang Ding 2022-09-29 12:38:48 +08:00
parent f6411dba9a
commit b238a5de41
No known key found for this signature in database
GPG key ID: 136F30F901A2231D
3 changed files with 12 additions and 23 deletions

View file

@ -343,21 +343,6 @@ func QueryRefsByDefID(defBlockID string, containChildren bool) (ret []*Ref) {
return
}
func QueryRefsByDefIDRefRootID(defBlockID, refRootBlockID string) (ret []*Ref) {
stmt := "SELECT * FROM refs WHERE def_block_id = ? AND root_id = ?"
rows, err := query(stmt, defBlockID, refRootBlockID)
if nil != err {
logging.LogErrorf("sql query failed: %s", err)
return
}
defer rows.Close()
for rows.Next() {
ref := scanRefRows(rows)
ret = append(ret, ref)
}
return
}
func QueryRefsByDefIDRefID(defBlockID, refBlockID string) (ret []*Ref) {
stmt := "SELECT * FROM refs WHERE def_block_id = ? AND block_id = ?"
rows, err := query(stmt, defBlockID, refBlockID)