summaryrefslogtreecommitdiff
path: root/itkxka.md
blob: 1b61f01b436b9c0733c7602d83c080213e349272 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
---
id: itkxka
date: 2026-05-18T22:45:08+0300
languages: [en]
aliases:

reviews:

tags:
- draft
- invention
- snippet

- zettelkasten
---
# Exclude missing-backlinks to excluded notes in ZK

```diff
diff --git a/internal/adapter/sqlite/note_dao.go b/internal/adapter/sqlite/note_dao.go
index 3910ba6..9d0a07a 100644
--- a/internal/adapter/sqlite/note_dao.go
+++ b/internal/adapter/sqlite/note_dao.go
@@ -688,6 +688,7 @@ WHERE collection_id IN (SELECT id FROM collections t WHERE kind = '%s' AND (%s))
 			)
 			WHERE incoming.target_id IS NOT NULL
 			  AND outgoing.source_id IS NULL
+			  AND incoming.source_id NOT IN (` + joinNoteIDs(opts.ExcludeIDs, ",") + `)
 		)`)
 	}

```


## Up
- 

## Down
-