From 80c5f1cd32c06977da69c8a815ffa35ce9a909f1 Mon Sep 17 00:00:00 2001 From: Přemysl Eric Janouch Date: Tue, 12 Dec 2023 06:37:20 +0100 Subject: Think about garbage collection --- main.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'main.go') diff --git a/main.go b/main.go index ca54ac0..71c3759 100644 --- a/main.go +++ b/main.go @@ -583,7 +583,8 @@ func cmdTag(args []string) error { // or even just clear the tag space completely: // // DELETE FROM tag_assignment - // WHERE tag IN (SELECT id FROM tag WHERE space = ?) + // WHERE tag IN (SELECT id FROM tag WHERE space = ?); + // DELETE FROM tag WHERE space = ?; stmt, err := tx.Prepare(`INSERT INTO tag_assignment(sha1, tag, weight) VALUES (?, (SELECT id FROM tag WHERE space = ? AND name = ?), ?) ON CONFLICT DO UPDATE SET weight = ?`) -- cgit v1.2.3-70-g09d2