Remove deprecated WebSocket API, switch to SQLite for reply store
This commit is contained in:
5
sql/queries.sql
Normal file
5
sql/queries.sql
Normal file
@@ -0,0 +1,5 @@
|
||||
/* name: ItemExists :one */
|
||||
SELECT COUNT(1) FROM replied_items WHERE item_type = ? AND id = ? AND updated_time = ?;
|
||||
|
||||
/* name: AddItem :exec */
|
||||
INSERT OR REPLACE INTO replied_items (id, item_type, updated_time) VALUES (?, ?, ?);
|
||||
6
sql/schema.sql
Normal file
6
sql/schema.sql
Normal file
@@ -0,0 +1,6 @@
|
||||
CREATE TABLE IF NOT EXISTS replied_items (
|
||||
id INT NOT NULL PRIMARY KEY,
|
||||
item_type TEXT NOT NULL CHECK( item_type IN ('p', 'c') ),
|
||||
updated_time INT NOT NULL,
|
||||
UNIQUE(id, item_type)
|
||||
);
|
||||
Reference in New Issue
Block a user