0
0
mirror of https://github.com/tursodatabase/libsql.git synced 2024-12-15 13:19:41 +00:00
libsql/libsql-wal/tests/assets/fixtures/trigger2.test
ad hoc ad79ef48a2
libsql wal tests ()
* add tests

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

17 lines
498 B
Plaintext

CREATE TABLE t1(a,b,c,d);
CREATE VIEW v2(a,b,c,d) AS SELECT * FROM t1;
CREATE TRIGGER v2ins INSTEAD OF INSERT ON v2 BEGIN
INSERT INTO t1(a,b,c,d) VALUES(new.a, new.b, new.c, new.d);
END;
INSERT INTO v2(a,d) VALUES(11,14);
SELECT * FROM t1;
CREATE TABLE t1(a INT PRIMARY KEY, b, c REAL, d, e);
CREATE TABLE t2(a INT, b, c REAL, d, e, PRIMARY KEY(a,b)) WITHOUT ROWID;
CREATE UNIQUE INDEX t2c ON t2(c);
CREATE UNIQUE INDEX t2d ON t2(d);
CREATE UNIQUE INDEX t2e ON t2(e);