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

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

28 lines
702 B
Plaintext

CREATE TABLE t16a(id "INTEGER" PRIMARY KEY AUTOINCREMENT, b [TEXT], c `INT`);
PRAGMA table_info=t16a;
CREATE TABLE t17(x INTEGER PRIMARY KEY, y TEXT);
INSERT INTO t17(x,y) VALUES(123,'elephant'),(248,'giraffe');
CREATE INDEX t17x ON t17(x);
DELETE FROM t17 WHERE x=99 OR x<130;
SELECT * FROM t17;
DROP INDEX t17x;
DELETE FROM t17;
INSERT INTO t17(x,y) VALUES(123,'elephant'),(248,'giraffe');
CREATE UNIQUE INDEX t17x ON t17(abs(x));
DELETE FROM t17 WHERE abs(x) IS NULL OR abs(x)<130;
SELECT * FROM t17;
DELETE FROM t17;
INSERT INTO t17(x,y) VALUES(123,'elephant'),(248,'giraffe');
UPDATE t17 SET y='ostrich' WHERE abs(x)=248;
SELECT * FROM t17 ORDER BY +x;