mirror of
https://github.com/aljazceru/turso.git
synced 2026-02-23 17:05:36 +01:00
add simple test
This commit is contained in:
@@ -787,3 +787,28 @@ do_execsql_test_on_specific_db {:memory:} rowid-references {
|
||||
AND `oid` = 2
|
||||
AND [oid] = 2;
|
||||
} {2|2|2|2|2|2|2|2|2|2|2|2}
|
||||
|
||||
do_execsql_test_on_specific_db {:memory:} null-in-search {
|
||||
CREATE TABLE t_x_asc (id INTEGER PRIMARY KEY, x);
|
||||
CREATE INDEX t_x_asc_idx ON t_x_asc(x ASC);
|
||||
CREATE TABLE t_x_desc (id INTEGER PRIMARY KEY, x);
|
||||
CREATE INDEX t_x_desc_idx ON t_x_desc(x DESC);
|
||||
INSERT INTO t_x_asc VALUES (1, NULL), (2, 2), (10, 10);
|
||||
INSERT INTO t_x_desc VALUES (1, NULL), (2, 2), (10, 10);
|
||||
SELECT * FROM t_x_asc WHERE x > 5 ORDER BY x ASC;
|
||||
SELECT * FROM t_x_asc WHERE x > 5 ORDER BY x DESC;
|
||||
SELECT * FROM t_x_asc WHERE x < 5 ORDER BY x ASC;
|
||||
SELECT * FROM t_x_asc WHERE x < 5 ORDER BY x DESC;
|
||||
SELECT * FROM t_x_desc WHERE x > 5 ORDER BY x ASC;
|
||||
SELECT * FROM t_x_desc WHERE x > 5 ORDER BY x DESC;
|
||||
SELECT * FROM t_x_desc WHERE x < 5 ORDER BY x ASC;
|
||||
SELECT * FROM t_x_desc WHERE x < 5 ORDER BY x DESC;
|
||||
} {10|10
|
||||
10|10
|
||||
2|2
|
||||
2|2
|
||||
10|10
|
||||
10|10
|
||||
2|2
|
||||
2|2}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user