summary refs log tree commit diff
path: root/database.h
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2019-12-06 12:09:51 -0500
committerJune McEnroe <june@causal.agency>2019-12-06 12:09:51 -0500
commit357276b599bd631f4a3c1cf63f63b886015ab9a0 (patch)
tree244b40c7f34b026afa4a1ca22126b729c169f643 /database.h
parentAdd catgirl format (diff)
downloadlitterbox-357276b599bd631f4a3c1cf63f63b886015ab9a0.tar.gz
litterbox-357276b599bd631f4a3c1cf63f63b886015ab9a0.zip
Add eventsDelete trigger
Diffstat (limited to '')
-rw-r--r--database.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/database.h b/database.h
index 038ce70..2481262 100644
--- a/database.h
+++ b/database.h
@@ -177,7 +177,6 @@ static const char *InitSQL = {
 		"target TEXT,"
 		"message TEXT"
 	");"
-	// TODO: Create other indexes on events?
 	"CREATE VIRTUAL TABLE search USING fts5 ("
 		"message,"
 		"content = events,"
@@ -187,6 +186,10 @@ static const char *InitSQL = {
 	"CREATE TRIGGER eventsInsert AFTER INSERT ON events BEGIN"
 	" INSERT INTO search (rowid, message) VALUES (new.id, new.message);"
 	"END;"
+	"CREATE TRIGGER eventsDelete AFTER DELETE ON events BEGIN"
+	" INSERT INTO search (search, rowid, message)"
+	" VALUES ('delete', old.id, old.message);"
+	"END;"
 	"COMMIT TRANSACTION;"
 };
 
llow=1'>Show status window while connectingJune McEnroe 2019-02-22Reorganize UI code for the umpteenth timeJune McEnroe It's actually in a good state now, I think. 2019-02-21Replace "view" with "window"June McEnroe I think originally I didn't want to use the same word as curses WINDOW but it's really much clearer for the user if they're just called windows. UI code probably needs yet another rewrite though. Still feels messy. 2019-02-21Remove ROT13June McEnroe It's just not convenient when it can only do the whole line... 2019-02-21Clean up man pageJune McEnroe 2019-01-26Draw UI before connectingJune McEnroe Otherwise the "Traveling" message isn't visible while connecting. 2019-01-25Avoid unused variable warnings with getyxJune McEnroe 2019-01-25Add GNU/Linux build instructionsJune McEnroe