mirror of
https://github.com/tursodatabase/libsql.git
synced 2024-12-12 14:23:38 +00:00
ad79ef48a2
* add tests * add bench
127 lines
2.7 KiB
Plaintext
127 lines
2.7 KiB
Plaintext
SELECT 1 IN ()
|
|
SELECT 1 IN (2)
|
|
SELECT 1 IN (2,3,4,5,6,7,8,9)
|
|
SELECT 1 NOT IN ()
|
|
SELECT 1 NOT IN (2)
|
|
SELECT 1 NOT IN (2,3,4,5,6,7,8,9)
|
|
SELECT null IN ()
|
|
SELECT null NOT IN ()
|
|
|
|
CREATE TABLE t1(x);
|
|
SELECT 1 IN t1;
|
|
|
|
SELECT 1 NOT IN t1
|
|
SELECT null IN t1
|
|
SELECT null NOT IN t1
|
|
|
|
CREATE TABLE t2(y INTEGER PRIMARY KEY);
|
|
SELECT 1 IN t2;
|
|
|
|
SELECT 1 NOT IN t2
|
|
SELECT null IN t2
|
|
SELECT null NOT IN t2
|
|
|
|
CREATE TABLE t3(z INT UNIQUE);
|
|
SELECT 1 IN t3;
|
|
|
|
SELECT 1 NOT IN t3
|
|
SELECT null IN t3
|
|
SELECT null NOT IN t3
|
|
SELECT 1 IN (SELECT x+y FROM t1, t2)
|
|
SELECT 1 NOT IN (SELECT x+y FROM t1,t2)
|
|
SELECT null IN (SELECT x+y FROM t1,t2)
|
|
SELECT null NOT IN (SELECT x+y FROM t1,t2)
|
|
SELECT 1.23 IN ()
|
|
SELECT 1.23 NOT IN ()
|
|
SELECT 1.23 IN t1
|
|
SELECT 1.23 NOT IN t1
|
|
SELECT 'hello' IN ()
|
|
SELECT 'hello' NOT IN ()
|
|
SELECT 'hello' IN t1
|
|
SELECT 'hello' NOT IN t1
|
|
SELECT x'303132' IN ()
|
|
SELECT x'303132' NOT IN ()
|
|
SELECT x'303132' IN t1
|
|
SELECT x'303132' NOT IN t1
|
|
SELECT 1 IN (2,3,4)
|
|
SELECT 1 NOT IN (2,3,4)
|
|
SELECT 'a' IN ('b','c','d')
|
|
SELECT 'a' NOT IN ('b','c','d')
|
|
SELECT 1 NOT IN t4
|
|
SELECT 1 IN t5
|
|
SELECT 1 NOT IN t5
|
|
SELECT 1 IN t6
|
|
SELECT 1 NOT IN t6
|
|
SELECT 'a' IN t7
|
|
SELECT 'a' NOT IN t7
|
|
SELECT 'a' IN t8
|
|
SELECT 'a' NOT IN t8
|
|
SELECT 2 IN (2,3,4,null)
|
|
SELECT 3 NOT IN (2,3,4,null)
|
|
SELECT 4 IN (2,3,4)
|
|
SELECT 2 NOT IN (2,3,4)
|
|
SELECT 'b' IN ('b','c','d')
|
|
SELECT 'c' NOT IN ('b','c','d')
|
|
SELECT 'd' IN ('b','c',null,'d')
|
|
SELECT 'b' NOT IN (null,'b','c','d')
|
|
SELECT 2 IN t4
|
|
SELECT 3 NOT IN t4
|
|
SELECT 4 IN t4n
|
|
SELECT 2 NOT IN t4n
|
|
SELECT 2 IN t5
|
|
SELECT 3 NOT IN t5
|
|
SELECT 2 IN t6
|
|
SELECT 3 NOT IN t6
|
|
SELECT 4 IN t6n
|
|
SELECT 2 NOT IN t6n
|
|
SELECT 'b' IN t7
|
|
SELECT 'c' NOT IN t7
|
|
SELECT 'c' IN t7n
|
|
SELECT 'd' NOT IN t7n
|
|
SELECT 'b' IN t8
|
|
SELECT 'c' NOT IN t8
|
|
SELECT 'c' IN t8n
|
|
SELECT 'd' NOT IN t8n
|
|
SELECT 'a' IN (NULL,'a')
|
|
SELECT 'a' IN (NULL,'b')
|
|
SELECT 'a' NOT IN (NULL,'a')
|
|
SELECT 'a' NOT IN (NULL,'b')
|
|
SELECT 1 IN (2,3,4,null)
|
|
SELECT 1 NOT IN (2,3,4,null)
|
|
SELECT 'a' IN ('b','c',null,'d')
|
|
SELECT 'a' NOT IN (null,'b','c','d')
|
|
SELECT 1 IN t4n
|
|
SELECT 5 NOT IN t4n
|
|
SELECT 6 IN t6n
|
|
SELECT 7 NOT IN t6n
|
|
SELECT 'a' IN t7n
|
|
SELECT 'e' NOT IN t7n
|
|
SELECT 'f' IN t8n
|
|
SELECT 'g' NOT IN t8n
|
|
SELECT null IN (2,3,4,null)
|
|
SELECT null NOT IN (2,3,4,null)
|
|
SELECT null IN (2,3,4)
|
|
SELECT null NOT IN (2,3,4)
|
|
SELECT null IN ('b','c','d')
|
|
SELECT null NOT IN ('b','c','d')
|
|
SELECT null IN ('b','c',null,'d')
|
|
SELECT null NOT IN (null,'b','c','d')
|
|
SELECT null IN t4
|
|
SELECT null NOT IN t4
|
|
SELECT null IN t4n
|
|
SELECT null NOT IN t4n
|
|
SELECT null IN t5
|
|
SELECT null NOT IN t5
|
|
SELECT null IN t6
|
|
SELECT null NOT IN t6
|
|
SELECT null IN t6n
|
|
SELECT null NOT IN t6n
|
|
SELECT null IN t7
|
|
SELECT null NOT IN t7
|
|
SELECT null IN t7n
|
|
SELECT null NOT IN t7n
|
|
SELECT null IN t8
|
|
SELECT null NOT IN t8
|
|
SELECT null IN t8n
|
|
SELECT null NOT IN t8n
|