summaryrefslogtreecommitdiff
path: root/main.go
diff options
context:
space:
mode:
authorPřemysl Eric Janouch <p@janouch.name>2023-12-12 06:37:20 +0100
committerPřemysl Eric Janouch <p@janouch.name>2023-12-12 06:37:20 +0100
commit80c5f1cd32c06977da69c8a815ffa35ce9a909f1 (patch)
treeb2e2e16ed2240afeeb8b582bcb6c88069e113737 /main.go
parent4ed83bdb017d7d078d7d56863f35b95940988e5b (diff)
downloadgallery-80c5f1cd32c06977da69c8a815ffa35ce9a909f1.tar.gz
gallery-80c5f1cd32c06977da69c8a815ffa35ce9a909f1.tar.xz
gallery-80c5f1cd32c06977da69c8a815ffa35ce9a909f1.zip
Think about garbage collection
Diffstat (limited to 'main.go')
-rw-r--r--main.go3
1 files changed, 2 insertions, 1 deletions
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 = ?`)