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

35 lines
1.1 KiB
Plaintext

CREATE VIRTUAL TABLE aaa USING zipfile('testzip');
CREATE VIRTUAL TABLE bbb USING zipfile("testzip");
CREATE VIRTUAL TABLE ccc USING zipfile(`testzip`);
CREATE VIRTUAL TABLE ddd USING zipfile([testzip]);
CREATE VIRTUAL TABLE eee USING zipfile(testzip);
CREATE VIRTUAL TABLE fff USING zipfile('test''zip');
WITH contents(name,mtime,data) AS (
VALUES('a.txt', 1000000, 'contents of a.txt') UNION ALL
VALUES('b.txt', 1000000, 'contents of b.txt')
) SELECT quote( zipfile(name,NULL,mtime,data) ) FROM contents;
SELECT name,mtime,data FROM zipfile($blob)
SELECT name,mtime,data,method FROM zipfile($blob)
SELECT name,mtime,data IS NULL,method FROM zipfile($blob)
CREATE VIRTUAL TABLE temp.zip USING zipfile('test.zip');
INSERT INTO temp.zip (name,data) VALUES ('test1','test');
INSERT INTO temp.zip (name,data) VALUES ('test2','test');
INSERT INTO temp.zip (name,data) VALUES ('test1','test');
INSERT INTO temp.zip (name,data) VALUES ('test2','test');
UPDATE OR REPLACE zip SET name='test2' WHERE name='test1';
SELECT name FROM zip;