mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-16 22:50:13 +01:00
🎨 Backlink count at the doc block title including sub-blocks https://github.com/siyuan-note/siyuan/issues/13791
This commit is contained in:
parent
6eaaf77a41
commit
310c9b844c
3 changed files with 6 additions and 5 deletions
|
|
@ -141,7 +141,7 @@ func QueryRootChildrenRefCount(defRootID string) (ret map[string]int) {
|
|||
func QueryRootBlockRefCount() (ret map[string]int) {
|
||||
ret = map[string]int{}
|
||||
|
||||
rows, err := query("SELECT def_block_root_id, COUNT(*) AS ref_cnt FROM refs GROUP BY def_block_root_id")
|
||||
rows, err := query("SELECT def_block_root_id, COUNT(DISTINCT block_id) AS ref_cnt FROM refs GROUP BY def_block_root_id")
|
||||
if err != nil {
|
||||
logging.LogErrorf("sql query failed: %s", err)
|
||||
return
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue