mirror of
https://github.com/tursodatabase/libsql.git
synced 2024-12-12 15:33:44 +00:00
ad79ef48a2
* add tests * add bench
20 lines
444 B
Plaintext
20 lines
444 B
Plaintext
|
|
CREATE TABLE t1(a, b);
|
|
CREATE TABLE log(x);
|
|
INSERT INTO t1 VALUES(1, 2);
|
|
INSERT INTO t1 VALUES(3, 4);
|
|
CREATE VIEW v1 AS SELECT a, b FROM t1;
|
|
|
|
CREATE TRIGGER tr1 INSTEAD OF DELETE ON v1 BEGIN
|
|
INSERT INTO log VALUES('delete');
|
|
END;
|
|
|
|
CREATE TRIGGER tr2 INSTEAD OF UPDATE ON v1 BEGIN
|
|
INSERT INTO log VALUES('update');
|
|
END;
|
|
|
|
CREATE TRIGGER tr3 INSTEAD OF INSERT ON v1 BEGIN
|
|
INSERT INTO log VALUES('insert');
|
|
END;
|
|
|