0
0
mirror of https://github.com/tursodatabase/libsql.git synced 2024-12-12 14:23:38 +00:00
ad hoc ad79ef48a2
libsql wal tests (#1408)
* add tests

* add bench
2024-05-24 13:59:17 +00:00

13 lines
309 B
Plaintext

CREATE TABLE v(x INTEGER);
CREATE TABLE hist(x INTEGER PRIMARY KEY, cnt INTEGER);
CREATE TRIGGER vt AFTER INSERT ON v BEGIN
INSERT INTO hist VALUES(new.x, 1) ON CONFLICT(x) DO
UPDATE SET cnt=cnt+1;
END;
INSERT INTO v VALUES(1), (4), (1), (5), (5), (8), (9), (1);
SELECT * FROM hist;