summaryrefslogtreecommitdiffstats
path: root/tests/fixtures/identity.sql
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2023-04-03 07:31:50 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2023-04-03 07:31:50 +0000
commit1fb60a37d31eacbac62ddafde51b829522925694 (patch)
tree5c04a33630f7a2cd4cff248e965053f97ec3e4ac /tests/fixtures/identity.sql
parentAdding upstream version 11.4.1. (diff)
downloadsqlglot-1fb60a37d31eacbac62ddafde51b829522925694.tar.xz
sqlglot-1fb60a37d31eacbac62ddafde51b829522925694.zip
Adding upstream version 11.4.5.upstream/11.4.5
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/fixtures/identity.sql')
-rw-r--r--tests/fixtures/identity.sql28
1 files changed, 26 insertions, 2 deletions
diff --git a/tests/fixtures/identity.sql b/tests/fixtures/identity.sql
index 3551423..5fab65b 100644
--- a/tests/fixtures/identity.sql
+++ b/tests/fixtures/identity.sql
@@ -74,6 +74,7 @@ a.b.INT(1.234)
INT(x / 100)
time * 100
int * 100
+dec + 1
x IN (-1, 1)
x IN ('a', 'a''a')
x IN ((1))
@@ -114,7 +115,6 @@ SPLIT(SPLIT(referrer, 'utm_source=')[OFFSET(1)], "&")[OFFSET(0)]
x[ORDINAL(1)][SAFE_OFFSET(2)]
x GLOB '??-*'
x GLOB y
-LIKE(x, 'z')
ILIKE(x, 'z')
x LIKE SUBSTR('abc', 1, 1)
x LIKE y
@@ -272,6 +272,7 @@ SELECT a FROM test WHERE TRUE OR NOT EXISTS(SELECT * FROM x)
SELECT a AS any, b AS some, c AS all, d AS exists FROM test WHERE a = ANY (SELECT 1)
SELECT a FROM test WHERE a > ALL (SELECT 1)
SELECT a FROM test WHERE (a, b) IN (SELECT 1, 2)
+SELECT X((SELECT 1) UNION (SELECT 2))
SELECT a FROM test ORDER BY a
SELECT a FROM test ORDER BY a, b
SELECT x FROM tests ORDER BY a DESC, b DESC, c
@@ -646,6 +647,7 @@ DROP TABLE a.b
DROP TABLE IF EXISTS a
DROP TABLE IF EXISTS a.b
DROP TABLE a CASCADE
+DROP TABLE s_hajo CASCADE CONSTRAINTS
DROP VIEW a
DROP VIEW a.b
DROP VIEW IF EXISTS a
@@ -697,7 +699,7 @@ WITH a AS (SELECT * FROM b) DELETE FROM a
WITH a AS (SELECT * FROM b) CACHE TABLE a
SELECT ? AS ? FROM x WHERE b BETWEEN ? AND ? GROUP BY ?, 1 LIMIT ?
SELECT :hello, ? FROM x LIMIT :my_limit
-SELECT * FROM x FETCH NEXT @take ROWS ONLY OFFSET @skip
+SELECT * FROM x OFFSET @skip FETCH NEXT @take ROWS ONLY
WITH a AS ((SELECT b.foo AS foo, b.bar AS bar FROM b) UNION ALL (SELECT c.foo AS foo, c.bar AS bar FROM c)) SELECT * FROM a
WITH a AS ((SELECT 1 AS b) UNION ALL (SELECT 1 AS b)) SELECT * FROM a
SELECT (WITH x AS (SELECT 1 AS y) SELECT * FROM x) AS z
@@ -762,11 +764,13 @@ ALTER TABLE pets ADD CONSTRAINT pets_persons_fk FOREIGN KEY (owner_first_name, o
ALTER TABLE pets ADD CONSTRAINT pets_name_not_cute_chk CHECK (LENGTH(name) < 20)
ALTER TABLE people10m ADD CONSTRAINT dateWithinRange CHECK (birthDate > '1900-01-01')
ALTER TABLE people10m ADD CONSTRAINT validIds CHECK (id > 1 AND id < 99999999) ENFORCED
+ALTER TABLE s_ut ADD CONSTRAINT s_ut_uq UNIQUE hajo
ALTER TABLE baa ADD CONSTRAINT boo PRIMARY KEY (x, y) NOT ENFORCED DEFERRABLE INITIALLY DEFERRED NORELY
ALTER TABLE baa ADD CONSTRAINT boo PRIMARY KEY (x, y) NOT ENFORCED DEFERRABLE INITIALLY DEFERRED NORELY
ALTER TABLE baa ADD CONSTRAINT boo FOREIGN KEY (x, y) REFERENCES persons ON UPDATE NO ACTION ON DELETE NO ACTION MATCH FULL
ALTER TABLE a ADD PRIMARY KEY (x, y) NOT ENFORCED
ALTER TABLE a ADD FOREIGN KEY (x, y) REFERENCES bla
+SELECT partition FROM a
SELECT end FROM a
SELECT id FROM b.a AS a QUALIFY ROW_NUMBER() OVER (PARTITION BY br ORDER BY sadf DESC) = 1
SELECT LEFT.FOO FROM BLA AS LEFT
@@ -776,3 +780,23 @@ SELECT * FROM x WHERE name ILIKE ANY XXX('a', 'b')
SELECT * FROM x WHERE name LIKE ANY XXX('a', 'b')
a OVERLAPS b
GRANT INSERT ON foo TO bla
+PRAGMA quick_check
+PRAGMA QUICK_CHECK(0)
+PRAGMA QUICK_CHECK('sqlite_master')
+PRAGMA schema.quick_check
+PRAGMA schema.QUICK_CHECK(0)
+PRAGMA schema.QUICK_CHECK('sqlite_master')
+PRAGMA synchronous = 2
+PRAGMA synchronous = FULL
+PRAGMA memory_limit = '1GB'
+PRAGMA schema.synchronous = 2
+PRAGMA schema.synchronous = FULL
+PRAGMA schema.memory_limit = '1GB'
+JSON_OBJECT()
+JSON_OBJECT('key1': 1, 'key2': TRUE)
+JSON_OBJECT('id': '5', 'fld1': 'bla', 'fld2': 'bar')
+JSON_OBJECT('x': NULL, 'y': 1 NULL ON NULL)
+JSON_OBJECT('x': NULL, 'y': 1 WITH UNIQUE KEYS)
+JSON_OBJECT('x': NULL, 'y': 1 ABSENT ON NULL WITH UNIQUE KEYS)
+JSON_OBJECT('x': 1 RETURNING VARCHAR(100))
+JSON_OBJECT('x': 1 RETURNING VARBINARY FORMAT JSON ENCODING UTF8)