code
stringlengths 26
870k
| docstring
stringlengths 1
65.6k
| func_name
stringlengths 1
194
| language
stringclasses 1
value | repo
stringlengths 8
68
| path
stringlengths 5
182
| url
stringlengths 46
251
| license
stringclasses 4
values |
---|---|---|---|---|---|---|---|
def test_sql_parse_select_34(self):
"""
SELECT $1
""" | SELECT $1 | test_sql_parse_select_34 | python | geldata/gel | tests/test_sql_parse.py | https://github.com/geldata/gel/blob/master/tests/test_sql_parse.py | Apache-2.0 |
def test_sql_parse_select_35(self):
"""
SELECT 1; SELECT a FROM b
""" | SELECT 1; SELECT a FROM b | test_sql_parse_select_35 | python | geldata/gel | tests/test_sql_parse.py | https://github.com/geldata/gel/blob/master/tests/test_sql_parse.py | Apache-2.0 |
def test_sql_parse_select_36(self):
"""
SELECT COUNT(DISTINCT id), * FROM targets
WHERE something IS NOT NULL
AND elsewhere::interval < now()
% OK %
SELECT count(DISTINCT id), * FROM targets
WHERE ((something IS NOT NULL)
AND ((elsewhere)::pg_catalog.interval < now()))
""" | SELECT COUNT(DISTINCT id), * FROM targets
WHERE something IS NOT NULL
AND elsewhere::interval < now()
% OK %
SELECT count(DISTINCT id), * FROM targets
WHERE ((something IS NOT NULL)
AND ((elsewhere)::pg_catalog.interval < now())) | test_sql_parse_select_36 | python | geldata/gel | tests/test_sql_parse.py | https://github.com/geldata/gel/blob/master/tests/test_sql_parse.py | Apache-2.0 |
def test_sql_parse_select_37(self):
"""
SELECT b AS x, a AS y FROM z
""" | SELECT b AS x, a AS y FROM z | test_sql_parse_select_37 | python | geldata/gel | tests/test_sql_parse.py | https://github.com/geldata/gel/blob/master/tests/test_sql_parse.py | Apache-2.0 |
def test_sql_parse_select_38(self):
"""
WITH a AS (SELECT * FROM x WHERE x.y = $1 AND x.z = 1)
SELECT * FROM a
% OK %
WITH a AS ((SELECT * FROM x WHERE ((x.y = $1) AND (x.z = 1))))
SELECT * FROM a
""" | WITH a AS (SELECT * FROM x WHERE x.y = $1 AND x.z = 1)
SELECT * FROM a
% OK %
WITH a AS ((SELECT * FROM x WHERE ((x.y = $1) AND (x.z = 1))))
SELECT * FROM a | test_sql_parse_select_38 | python | geldata/gel | tests/test_sql_parse.py | https://github.com/geldata/gel/blob/master/tests/test_sql_parse.py | Apache-2.0 |
def test_sql_parse_select_39(self):
"""
SELECT * FROM x WHERE y IN ($1)
% OK %
SELECT * FROM x WHERE (y IN ($1))
""" | SELECT * FROM x WHERE y IN ($1)
% OK %
SELECT * FROM x WHERE (y IN ($1)) | test_sql_parse_select_39 | python | geldata/gel | tests/test_sql_parse.py | https://github.com/geldata/gel/blob/master/tests/test_sql_parse.py | Apache-2.0 |
def test_sql_parse_select_40(self):
"""
SELECT * FROM x WHERE y IN ($1, $2, $3)
% OK %
SELECT * FROM x WHERE (y IN ($1, $2, $3))
""" | SELECT * FROM x WHERE y IN ($1, $2, $3)
% OK %
SELECT * FROM x WHERE (y IN ($1, $2, $3)) | test_sql_parse_select_40 | python | geldata/gel | tests/test_sql_parse.py | https://github.com/geldata/gel/blob/master/tests/test_sql_parse.py | Apache-2.0 |
def test_sql_parse_select_41(self):
"""
SELECT * FROM x WHERE y IN ( $1::uuid )
% OK %
SELECT * FROM x WHERE (y IN (($1)::uuid))
""" | SELECT * FROM x WHERE y IN ( $1::uuid )
% OK %
SELECT * FROM x WHERE (y IN (($1)::uuid)) | test_sql_parse_select_41 | python | geldata/gel | tests/test_sql_parse.py | https://github.com/geldata/gel/blob/master/tests/test_sql_parse.py | Apache-2.0 |
def test_sql_parse_select_42(self):
"""
SELECT * FROM x
WHERE y IN ( $1::uuid, $2::uuid, $3::uuid )
% OK %
SELECT * FROM x
WHERE (y IN (($1)::uuid, ($2)::uuid, ($3)::uuid))
""" | SELECT * FROM x
WHERE y IN ( $1::uuid, $2::uuid, $3::uuid )
% OK %
SELECT * FROM x
WHERE (y IN (($1)::uuid, ($2)::uuid, ($3)::uuid)) | test_sql_parse_select_42 | python | geldata/gel | tests/test_sql_parse.py | https://github.com/geldata/gel/blob/master/tests/test_sql_parse.py | Apache-2.0 |
def test_sql_parse_select_43(self):
"""
SELECT * FROM x AS a, y AS b
""" | SELECT * FROM x AS a, y AS b | test_sql_parse_select_43 | python | geldata/gel | tests/test_sql_parse.py | https://github.com/geldata/gel/blob/master/tests/test_sql_parse.py | Apache-2.0 |
def test_sql_parse_select_44(self):
"""
SELECT * FROM y AS a, x AS b
""" | SELECT * FROM y AS a, x AS b | test_sql_parse_select_44 | python | geldata/gel | tests/test_sql_parse.py | https://github.com/geldata/gel/blob/master/tests/test_sql_parse.py | Apache-2.0 |
def test_sql_parse_select_45(self):
"""
SELECT x AS a, y AS b FROM x
""" | SELECT x AS a, y AS b FROM x | test_sql_parse_select_45 | python | geldata/gel | tests/test_sql_parse.py | https://github.com/geldata/gel/blob/master/tests/test_sql_parse.py | Apache-2.0 |
def test_sql_parse_select_46(self):
"""
SELECT x, y FROM z
""" | SELECT x, y FROM z | test_sql_parse_select_46 | python | geldata/gel | tests/test_sql_parse.py | https://github.com/geldata/gel/blob/master/tests/test_sql_parse.py | Apache-2.0 |
def test_sql_parse_select_47(self):
"""
SELECT y, x FROM z
""" | SELECT y, x FROM z | test_sql_parse_select_47 | python | geldata/gel | tests/test_sql_parse.py | https://github.com/geldata/gel/blob/master/tests/test_sql_parse.py | Apache-2.0 |
def test_sql_parse_select_48(self):
"""
SELECT * FROM a
""" | SELECT * FROM a | test_sql_parse_select_48 | python | geldata/gel | tests/test_sql_parse.py | https://github.com/geldata/gel/blob/master/tests/test_sql_parse.py | Apache-2.0 |
def test_sql_parse_select_49(self):
"""
SELECT * FROM a AS b
""" | SELECT * FROM a AS b | test_sql_parse_select_49 | python | geldata/gel | tests/test_sql_parse.py | https://github.com/geldata/gel/blob/master/tests/test_sql_parse.py | Apache-2.0 |
def test_sql_parse_select_50(self):
"""
-- nothing
% OK %
""" | -- nothing
% OK % | test_sql_parse_select_50 | python | geldata/gel | tests/test_sql_parse.py | https://github.com/geldata/gel/blob/master/tests/test_sql_parse.py | Apache-2.0 |
def test_sql_parse_select_51(self):
"""
SELECT INTERVAL (0) $2
% OK %
SELECT ($2)::pg_catalog.interval
""" | SELECT INTERVAL (0) $2
% OK %
SELECT ($2)::pg_catalog.interval | test_sql_parse_select_51 | python | geldata/gel | tests/test_sql_parse.py | https://github.com/geldata/gel/blob/master/tests/test_sql_parse.py | Apache-2.0 |
def test_sql_parse_select_52(self):
"""
SELECT INTERVAL (2) $2
% OK %
SELECT ($2)::pg_catalog.interval
""" | SELECT INTERVAL (2) $2
% OK %
SELECT ($2)::pg_catalog.interval | test_sql_parse_select_52 | python | geldata/gel | tests/test_sql_parse.py | https://github.com/geldata/gel/blob/master/tests/test_sql_parse.py | Apache-2.0 |
def test_sql_parse_select_53(self):
"""
SELECT * FROM t WHERE t.a IN (1, 2) AND t.b = 3
% OK %
SELECT * FROM t WHERE ((t.a IN (1, 2)) AND (t.b = 3))
""" | SELECT * FROM t WHERE t.a IN (1, 2) AND t.b = 3
% OK %
SELECT * FROM t WHERE ((t.a IN (1, 2)) AND (t.b = 3)) | test_sql_parse_select_53 | python | geldata/gel | tests/test_sql_parse.py | https://github.com/geldata/gel/blob/master/tests/test_sql_parse.py | Apache-2.0 |
def test_sql_parse_select_54(self):
"""
SELECT * FROM t WHERE t.b = 3 AND t.a IN (1, 2)
% OK %
SELECT * FROM t WHERE ((t.b = 3) AND (t.a IN (1, 2)))
""" | SELECT * FROM t WHERE t.b = 3 AND t.a IN (1, 2)
% OK %
SELECT * FROM t WHERE ((t.b = 3) AND (t.a IN (1, 2))) | test_sql_parse_select_54 | python | geldata/gel | tests/test_sql_parse.py | https://github.com/geldata/gel/blob/master/tests/test_sql_parse.py | Apache-2.0 |
def test_sql_parse_select_55(self):
"""
SELECT * FROM t WHERE a && '[1,2]'
% OK %
SELECT * FROM t WHERE (a && '[1,2]')
""" | SELECT * FROM t WHERE a && '[1,2]'
% OK %
SELECT * FROM t WHERE (a && '[1,2]') | test_sql_parse_select_55 | python | geldata/gel | tests/test_sql_parse.py | https://github.com/geldata/gel/blob/master/tests/test_sql_parse.py | Apache-2.0 |
def test_sql_parse_select_56(self):
"""
SELECT * FROM t WHERE a && '[1,2]'::int4range
% OK %
SELECT * FROM t WHERE (a && ('[1,2]')::int4range)
""" | SELECT * FROM t WHERE a && '[1,2]'::int4range
% OK %
SELECT * FROM t WHERE (a && ('[1,2]')::int4range) | test_sql_parse_select_56 | python | geldata/gel | tests/test_sql_parse.py | https://github.com/geldata/gel/blob/master/tests/test_sql_parse.py | Apache-2.0 |
def test_sql_parse_select_57(self):
"""
SELECT * FROM t_20210301_x
""" | SELECT * FROM t_20210301_x | test_sql_parse_select_57 | python | geldata/gel | tests/test_sql_parse.py | https://github.com/geldata/gel/blob/master/tests/test_sql_parse.py | Apache-2.0 |
def test_sql_parse_select_58(self):
"""
SELECT (1.2 * 3.4)
""" | SELECT (1.2 * 3.4) | test_sql_parse_select_58 | python | geldata/gel | tests/test_sql_parse.py | https://github.com/geldata/gel/blob/master/tests/test_sql_parse.py | Apache-2.0 |
def test_sql_parse_select_59(self):
"""
SELECT TRUE; SELECT FALSE
""" | SELECT TRUE; SELECT FALSE | test_sql_parse_select_59 | python | geldata/gel | tests/test_sql_parse.py | https://github.com/geldata/gel/blob/master/tests/test_sql_parse.py | Apache-2.0 |
def test_sql_parse_select_60(self):
"""
SELECT -1; SELECT 0; SELECT 1
""" | SELECT -1; SELECT 0; SELECT 1 | test_sql_parse_select_60 | python | geldata/gel | tests/test_sql_parse.py | https://github.com/geldata/gel/blob/master/tests/test_sql_parse.py | Apache-2.0 |
def test_sql_parse_select_61(self):
"""
SELECT a[1:3], b.x
% OK %
SELECT (a)[1:3], b.x
""" | SELECT a[1:3], b.x
% OK %
SELECT (a)[1:3], b.x | test_sql_parse_select_61 | python | geldata/gel | tests/test_sql_parse.py | https://github.com/geldata/gel/blob/master/tests/test_sql_parse.py | Apache-2.0 |
def test_sql_parse_insert_00(self):
"""
INSERT INTO my_table (id, name) VALUES (1, 'some')
""" | INSERT INTO my_table (id, name) VALUES (1, 'some') | test_sql_parse_insert_00 | python | geldata/gel | tests/test_sql_parse.py | https://github.com/geldata/gel/blob/master/tests/test_sql_parse.py | Apache-2.0 |
def test_sql_parse_insert_01(self):
"""
INSERT INTO my_table (id, name) SELECT 1, 'some'
% OK %
INSERT INTO my_table (id, name) ((SELECT 1, 'some'))
""" | INSERT INTO my_table (id, name) SELECT 1, 'some'
% OK %
INSERT INTO my_table (id, name) ((SELECT 1, 'some')) | test_sql_parse_insert_01 | python | geldata/gel | tests/test_sql_parse.py | https://github.com/geldata/gel/blob/master/tests/test_sql_parse.py | Apache-2.0 |
def test_sql_parse_insert_02(self):
"""
INSERT INTO my_table (id) VALUES (5) RETURNING id, date
""" | INSERT INTO my_table (id) VALUES (5) RETURNING id, date | test_sql_parse_insert_02 | python | geldata/gel | tests/test_sql_parse.py | https://github.com/geldata/gel/blob/master/tests/test_sql_parse.py | Apache-2.0 |
def test_sql_parse_insert_03(self):
"""
INSERT INTO my_table (id) VALUES (5) RETURNING id, "date"
% OK %
INSERT INTO my_table (id) VALUES (5) RETURNING id, date
""" | INSERT INTO my_table (id) VALUES (5) RETURNING id, "date"
% OK %
INSERT INTO my_table (id) VALUES (5) RETURNING id, date | test_sql_parse_insert_03 | python | geldata/gel | tests/test_sql_parse.py | https://github.com/geldata/gel/blob/master/tests/test_sql_parse.py | Apache-2.0 |
def test_sql_parse_insert_04(self):
"""
INSERT INTO my_table (id) VALUES(1); SELECT * FROM my_table
% OK %
INSERT INTO my_table (id) VALUES (1); SELECT * FROM my_table
""" | INSERT INTO my_table (id) VALUES(1); SELECT * FROM my_table
% OK %
INSERT INTO my_table (id) VALUES (1); SELECT * FROM my_table | test_sql_parse_insert_04 | python | geldata/gel | tests/test_sql_parse.py | https://github.com/geldata/gel/blob/master/tests/test_sql_parse.py | Apache-2.0 |
def test_sql_parse_insert_05(self):
"""
INSERT INTO my_table
""" | INSERT INTO my_table | test_sql_parse_insert_05 | python | geldata/gel | tests/test_sql_parse.py | https://github.com/geldata/gel/blob/master/tests/test_sql_parse.py | Apache-2.0 |
def test_sql_parse_insert_06(self):
"""
INSERT INTO table_one (id, name) SELECT * from table_two
% OK %
INSERT INTO table_one (id, name) ((SELECT * FROM table_two))
""" | INSERT INTO table_one (id, name) SELECT * from table_two
% OK %
INSERT INTO table_one (id, name) ((SELECT * FROM table_two)) | test_sql_parse_insert_06 | python | geldata/gel | tests/test_sql_parse.py | https://github.com/geldata/gel/blob/master/tests/test_sql_parse.py | Apache-2.0 |
def test_sql_parse_insert_07(self):
"""
WITH fake as (SELECT * FROM inner_table)
INSERT INTO dataset SELECT * FROM fake
% OK %
WITH fake AS ((SELECT * FROM inner_table))
INSERT INTO dataset ((SELECT * FROM fake))
""" | WITH fake as (SELECT * FROM inner_table)
INSERT INTO dataset SELECT * FROM fake
% OK %
WITH fake AS ((SELECT * FROM inner_table))
INSERT INTO dataset ((SELECT * FROM fake)) | test_sql_parse_insert_07 | python | geldata/gel | tests/test_sql_parse.py | https://github.com/geldata/gel/blob/master/tests/test_sql_parse.py | Apache-2.0 |
def test_sql_parse_insert_08(self):
"""
INSERT INTO test (a, b) VALUES
(ARRAY[$1, $1, $2, $3], $4::timestamptz),
(ARRAY[$1, $1, $2, $3], $4::timestamptz),
($5, $6::timestamptz)
% OK %
INSERT INTO test (a, b) VALUES
(ARRAY[$1, $1, $2, $3], ($4)::timestamptz),
(ARRAY[$1, $1, $2, $3], ($4)::timestamptz),
($5, ($6)::timestamptz)
""" | INSERT INTO test (a, b) VALUES
(ARRAY[$1, $1, $2, $3], $4::timestamptz),
(ARRAY[$1, $1, $2, $3], $4::timestamptz),
($5, $6::timestamptz)
% OK %
INSERT INTO test (a, b) VALUES
(ARRAY[$1, $1, $2, $3], ($4)::timestamptz),
(ARRAY[$1, $1, $2, $3], ($4)::timestamptz),
($5, ($6)::timestamptz) | test_sql_parse_insert_08 | python | geldata/gel | tests/test_sql_parse.py | https://github.com/geldata/gel/blob/master/tests/test_sql_parse.py | Apache-2.0 |
def test_sql_parse_insert_09(self):
"""
INSERT INTO films (code, title, did) VALUES
('UA502', 'Bananas', 105), ('T_601', 'Yojimbo', DEFAULT)
""" | INSERT INTO films (code, title, did) VALUES
('UA502', 'Bananas', 105), ('T_601', 'Yojimbo', DEFAULT) | test_sql_parse_insert_09 | python | geldata/gel | tests/test_sql_parse.py | https://github.com/geldata/gel/blob/master/tests/test_sql_parse.py | Apache-2.0 |
def test_sql_parse_insert_10(self):
"""
INSERT INTO films (code, title, did) VALUES ($1, $2, $3)
""" | INSERT INTO films (code, title, did) VALUES ($1, $2, $3) | test_sql_parse_insert_10 | python | geldata/gel | tests/test_sql_parse.py | https://github.com/geldata/gel/blob/master/tests/test_sql_parse.py | Apache-2.0 |
def test_sql_parse_insert_11(self):
"""
INSERT INTO films DEFAULT VALUES
ON CONFLICT DO UPDATE
SET (a, b) = ('a', 'b'), c = 'c', (d, e) = ('d', 'e')
""" | INSERT INTO films DEFAULT VALUES
ON CONFLICT DO UPDATE
SET (a, b) = ('a', 'b'), c = 'c', (d, e) = ('d', 'e') | test_sql_parse_insert_11 | python | geldata/gel | tests/test_sql_parse.py | https://github.com/geldata/gel/blob/master/tests/test_sql_parse.py | Apache-2.0 |
def test_sql_parse_insert_12(self):
"""
INSERT INTO foo DEFAULT VALUES
RETURNING a[1:3] AS a, b.x AS b
% OK %
INSERT INTO foo DEFAULT VALUES
RETURNING (a)[1:3] AS a, b.x AS b
""" | INSERT INTO foo DEFAULT VALUES
RETURNING a[1:3] AS a, b.x AS b
% OK %
INSERT INTO foo DEFAULT VALUES
RETURNING (a)[1:3] AS a, b.x AS b | test_sql_parse_insert_12 | python | geldata/gel | tests/test_sql_parse.py | https://github.com/geldata/gel/blob/master/tests/test_sql_parse.py | Apache-2.0 |
def test_sql_parse_update_00(self):
"""
UPDATE my_table SET the_value = DEFAULT
""" | UPDATE my_table SET the_value = DEFAULT | test_sql_parse_update_00 | python | geldata/gel | tests/test_sql_parse.py | https://github.com/geldata/gel/blob/master/tests/test_sql_parse.py | Apache-2.0 |
def test_sql_parse_update_01(self):
"""
UPDATE tictactoe SET board[1:3][1:3] = '{{,,},{,,},{,,}}'
WHERE game = 1
% OK %
UPDATE tictactoe SET board[1:3][1:3] = '{{,,},{,,},{,,}}'
WHERE (game = 1)
""" | UPDATE tictactoe SET board[1:3][1:3] = '{{,,},{,,},{,,}}'
WHERE game = 1
% OK %
UPDATE tictactoe SET board[1:3][1:3] = '{{,,},{,,},{,,}}'
WHERE (game = 1) | test_sql_parse_update_01 | python | geldata/gel | tests/test_sql_parse.py | https://github.com/geldata/gel/blob/master/tests/test_sql_parse.py | Apache-2.0 |
def test_sql_parse_update_02(self):
"""
UPDATE accounts SET
(contact_first_name, contact_last_name) =
(SELECT first_name, last_name
FROM salesmen WHERE salesmen.id = accounts.sales_id)
% OK %
UPDATE accounts SET
(contact_first_name, contact_last_name) =
((SELECT first_name, last_name
FROM salesmen WHERE (salesmen.id = accounts.sales_id)))
""" | UPDATE accounts SET
(contact_first_name, contact_last_name) =
(SELECT first_name, last_name
FROM salesmen WHERE salesmen.id = accounts.sales_id)
% OK %
UPDATE accounts SET
(contact_first_name, contact_last_name) =
((SELECT first_name, last_name
FROM salesmen WHERE (salesmen.id = accounts.sales_id))) | test_sql_parse_update_02 | python | geldata/gel | tests/test_sql_parse.py | https://github.com/geldata/gel/blob/master/tests/test_sql_parse.py | Apache-2.0 |
def test_sql_parse_update_03(self):
"""
UPDATE my_table SET id = 5; DELETE FROM my_table
""" | UPDATE my_table SET id = 5; DELETE FROM my_table | test_sql_parse_update_03 | python | geldata/gel | tests/test_sql_parse.py | https://github.com/geldata/gel/blob/master/tests/test_sql_parse.py | Apache-2.0 |
def test_sql_parse_update_04(self):
"""
UPDATE dataset SET a = 5
WHERE id IN (SELECT * from table_one)
OR age IN (select * from table_two)
% OK %
UPDATE dataset SET a = 5
WHERE (id = ANY ((SELECT * FROM table_one))
OR age = ANY ((SELECT * FROM table_two)))
""" | UPDATE dataset SET a = 5
WHERE id IN (SELECT * from table_one)
OR age IN (select * from table_two)
% OK %
UPDATE dataset SET a = 5
WHERE (id = ANY ((SELECT * FROM table_one))
OR age = ANY ((SELECT * FROM table_two))) | test_sql_parse_update_04 | python | geldata/gel | tests/test_sql_parse.py | https://github.com/geldata/gel/blob/master/tests/test_sql_parse.py | Apache-2.0 |
def test_sql_parse_update_05(self):
"""
UPDATE dataset SET a = 5 FROM extra WHERE b = c
% OK %
UPDATE dataset SET a = 5 FROM extra WHERE (b = c)
""" | UPDATE dataset SET a = 5 FROM extra WHERE b = c
% OK %
UPDATE dataset SET a = 5 FROM extra WHERE (b = c) | test_sql_parse_update_05 | python | geldata/gel | tests/test_sql_parse.py | https://github.com/geldata/gel/blob/master/tests/test_sql_parse.py | Apache-2.0 |
def test_sql_parse_update_06(self):
"""
UPDATE users SET one_thing = $1, second_thing = $2
WHERE users.id = $1
% OK %
UPDATE users SET one_thing = $1, second_thing = $2
WHERE (users.id = $1)
""" | UPDATE users SET one_thing = $1, second_thing = $2
WHERE users.id = $1
% OK %
UPDATE users SET one_thing = $1, second_thing = $2
WHERE (users.id = $1) | test_sql_parse_update_06 | python | geldata/gel | tests/test_sql_parse.py | https://github.com/geldata/gel/blob/master/tests/test_sql_parse.py | Apache-2.0 |
def test_sql_parse_update_07(self):
"""
UPDATE users SET something_else = $1 WHERE users.id = $1
% OK %
UPDATE users SET something_else = $1 WHERE (users.id = $1)
""" | UPDATE users SET something_else = $1 WHERE users.id = $1
% OK %
UPDATE users SET something_else = $1 WHERE (users.id = $1) | test_sql_parse_update_07 | python | geldata/gel | tests/test_sql_parse.py | https://github.com/geldata/gel/blob/master/tests/test_sql_parse.py | Apache-2.0 |
def test_sql_parse_update_08(self):
"""
UPDATE users SET something_else =
(SELECT a FROM x WHERE uid = users.id LIMIT 1)
WHERE users.id = $1
% OK %
UPDATE users SET something_else =
((SELECT a FROM x WHERE (uid = users.id) LIMIT 1))
WHERE (users.id = $1)
""" | UPDATE users SET something_else =
(SELECT a FROM x WHERE uid = users.id LIMIT 1)
WHERE users.id = $1
% OK %
UPDATE users SET something_else =
((SELECT a FROM x WHERE (uid = users.id) LIMIT 1))
WHERE (users.id = $1) | test_sql_parse_update_08 | python | geldata/gel | tests/test_sql_parse.py | https://github.com/geldata/gel/blob/master/tests/test_sql_parse.py | Apache-2.0 |
def test_sql_parse_update_09(self):
"""
UPDATE x SET a = 1, b = 2, c = 3
""" | UPDATE x SET a = 1, b = 2, c = 3 | test_sql_parse_update_09 | python | geldata/gel | tests/test_sql_parse.py | https://github.com/geldata/gel/blob/master/tests/test_sql_parse.py | Apache-2.0 |
def test_sql_parse_update_10(self):
"""
UPDATE x SET z = now()
""" | UPDATE x SET z = now() | test_sql_parse_update_10 | python | geldata/gel | tests/test_sql_parse.py | https://github.com/geldata/gel/blob/master/tests/test_sql_parse.py | Apache-2.0 |
def test_sql_parse_update_11(self):
"""
UPDATE x SET (a, b) = ('a', 'b'), c = 'c', (d, e) = ('d', 'e')
""" | UPDATE x SET (a, b) = ('a', 'b'), c = 'c', (d, e) = ('d', 'e') | test_sql_parse_update_11 | python | geldata/gel | tests/test_sql_parse.py | https://github.com/geldata/gel/blob/master/tests/test_sql_parse.py | Apache-2.0 |
def test_sql_parse_update_12(self):
"""
UPDATE tictactoe SET
(board[1:3][1:3], finished) = ('{{,,},{,,},{,,}}', FALSE)
""" | UPDATE tictactoe SET
(board[1:3][1:3], finished) = ('{{,,},{,,},{,,}}', FALSE) | test_sql_parse_update_12 | python | geldata/gel | tests/test_sql_parse.py | https://github.com/geldata/gel/blob/master/tests/test_sql_parse.py | Apache-2.0 |
def test_sql_parse_update_13(self):
"""
UPDATE tictactoe SET a = a RETURNING *
""" | UPDATE tictactoe SET a = a RETURNING * | test_sql_parse_update_13 | python | geldata/gel | tests/test_sql_parse.py | https://github.com/geldata/gel/blob/master/tests/test_sql_parse.py | Apache-2.0 |
def test_sql_parse_delete(self):
"""
DELETE FROM dataset USING table_one
WHERE x = y OR x IN (SELECT * from table_two)
% OK %
DELETE FROM dataset USING table_one
WHERE ((x = y) OR x = ANY ((SELECT * FROM table_two)))
""" | DELETE FROM dataset USING table_one
WHERE x = y OR x IN (SELECT * from table_two)
% OK %
DELETE FROM dataset USING table_one
WHERE ((x = y) OR x = ANY ((SELECT * FROM table_two))) | test_sql_parse_delete | python | geldata/gel | tests/test_sql_parse.py | https://github.com/geldata/gel/blob/master/tests/test_sql_parse.py | Apache-2.0 |
def test_sql_parse_transaction_00(self):
"""
BEGIN
""" | BEGIN | test_sql_parse_transaction_00 | python | geldata/gel | tests/test_sql_parse.py | https://github.com/geldata/gel/blob/master/tests/test_sql_parse.py | Apache-2.0 |
def test_sql_parse_transaction_01(self):
"""
BEGIN TRANSACTION
% OK %
BEGIN
""" | BEGIN TRANSACTION
% OK %
BEGIN | test_sql_parse_transaction_01 | python | geldata/gel | tests/test_sql_parse.py | https://github.com/geldata/gel/blob/master/tests/test_sql_parse.py | Apache-2.0 |
def test_sql_parse_transaction_02(self):
"""
BEGIN ISOLATION LEVEL REPEATABLE READ READ ONLY DEFERRABLE
""" | BEGIN ISOLATION LEVEL REPEATABLE READ READ ONLY DEFERRABLE | test_sql_parse_transaction_02 | python | geldata/gel | tests/test_sql_parse.py | https://github.com/geldata/gel/blob/master/tests/test_sql_parse.py | Apache-2.0 |
def test_sql_parse_transaction_03(self):
"""
START TRANSACTION
""" | START TRANSACTION | test_sql_parse_transaction_03 | python | geldata/gel | tests/test_sql_parse.py | https://github.com/geldata/gel/blob/master/tests/test_sql_parse.py | Apache-2.0 |
def test_sql_parse_transaction_04(self):
"""
START TRANSACTION ISOLATION LEVEL REPEATABLE READ
""" | START TRANSACTION ISOLATION LEVEL REPEATABLE READ | test_sql_parse_transaction_04 | python | geldata/gel | tests/test_sql_parse.py | https://github.com/geldata/gel/blob/master/tests/test_sql_parse.py | Apache-2.0 |
def test_sql_parse_transaction_05(self):
"""
START TRANSACTION ISOLATION LEVEL READ COMMITTED
""" | START TRANSACTION ISOLATION LEVEL READ COMMITTED | test_sql_parse_transaction_05 | python | geldata/gel | tests/test_sql_parse.py | https://github.com/geldata/gel/blob/master/tests/test_sql_parse.py | Apache-2.0 |
def test_sql_parse_transaction_06(self):
"""
START TRANSACTION ISOLATION LEVEL READ UNCOMMITTED
""" | START TRANSACTION ISOLATION LEVEL READ UNCOMMITTED | test_sql_parse_transaction_06 | python | geldata/gel | tests/test_sql_parse.py | https://github.com/geldata/gel/blob/master/tests/test_sql_parse.py | Apache-2.0 |
def test_sql_parse_transaction_07(self):
"""
START TRANSACTION READ WRITE
""" | START TRANSACTION READ WRITE | test_sql_parse_transaction_07 | python | geldata/gel | tests/test_sql_parse.py | https://github.com/geldata/gel/blob/master/tests/test_sql_parse.py | Apache-2.0 |
def test_sql_parse_transaction_08(self):
"""
START TRANSACTION READ ONLY
""" | START TRANSACTION READ ONLY | test_sql_parse_transaction_08 | python | geldata/gel | tests/test_sql_parse.py | https://github.com/geldata/gel/blob/master/tests/test_sql_parse.py | Apache-2.0 |
def test_sql_parse_transaction_09(self):
"""
START TRANSACTION NOT DEFERRABLE
""" | START TRANSACTION NOT DEFERRABLE | test_sql_parse_transaction_09 | python | geldata/gel | tests/test_sql_parse.py | https://github.com/geldata/gel/blob/master/tests/test_sql_parse.py | Apache-2.0 |
def test_sql_parse_transaction_10(self):
"""
START TRANSACTION DEFERRABLE
""" | START TRANSACTION DEFERRABLE | test_sql_parse_transaction_10 | python | geldata/gel | tests/test_sql_parse.py | https://github.com/geldata/gel/blob/master/tests/test_sql_parse.py | Apache-2.0 |
def test_sql_parse_transaction_11(self):
"""
COMMIT
""" | COMMIT | test_sql_parse_transaction_11 | python | geldata/gel | tests/test_sql_parse.py | https://github.com/geldata/gel/blob/master/tests/test_sql_parse.py | Apache-2.0 |
def test_sql_parse_transaction_12(self):
"""
COMMIT TRANSACTION
% OK %
COMMIT
""" | COMMIT TRANSACTION
% OK %
COMMIT | test_sql_parse_transaction_12 | python | geldata/gel | tests/test_sql_parse.py | https://github.com/geldata/gel/blob/master/tests/test_sql_parse.py | Apache-2.0 |
def test_sql_parse_transaction_13(self):
"""
COMMIT WORK
% OK %
COMMIT
""" | COMMIT WORK
% OK %
COMMIT | test_sql_parse_transaction_13 | python | geldata/gel | tests/test_sql_parse.py | https://github.com/geldata/gel/blob/master/tests/test_sql_parse.py | Apache-2.0 |
def test_sql_parse_transaction_14(self):
"""
COMMIT AND NO CHAIN
% OK %
COMMIT
""" | COMMIT AND NO CHAIN
% OK %
COMMIT | test_sql_parse_transaction_14 | python | geldata/gel | tests/test_sql_parse.py | https://github.com/geldata/gel/blob/master/tests/test_sql_parse.py | Apache-2.0 |
def test_sql_parse_transaction_15(self):
"""
COMMIT AND CHAIN
""" | COMMIT AND CHAIN | test_sql_parse_transaction_15 | python | geldata/gel | tests/test_sql_parse.py | https://github.com/geldata/gel/blob/master/tests/test_sql_parse.py | Apache-2.0 |
def test_sql_parse_transaction_16(self):
"""
ROLLBACK
""" | ROLLBACK | test_sql_parse_transaction_16 | python | geldata/gel | tests/test_sql_parse.py | https://github.com/geldata/gel/blob/master/tests/test_sql_parse.py | Apache-2.0 |
def test_sql_parse_transaction_17(self):
"""
ROLLBACK TRANSACTION
% OK %
ROLLBACK
""" | ROLLBACK TRANSACTION
% OK %
ROLLBACK | test_sql_parse_transaction_17 | python | geldata/gel | tests/test_sql_parse.py | https://github.com/geldata/gel/blob/master/tests/test_sql_parse.py | Apache-2.0 |
def test_sql_parse_transaction_18(self):
"""
ROLLBACK WORK
% OK %
ROLLBACK
""" | ROLLBACK WORK
% OK %
ROLLBACK | test_sql_parse_transaction_18 | python | geldata/gel | tests/test_sql_parse.py | https://github.com/geldata/gel/blob/master/tests/test_sql_parse.py | Apache-2.0 |
def test_sql_parse_transaction_19(self):
"""
ROLLBACK AND NO CHAIN
% OK %
ROLLBACK
""" | ROLLBACK AND NO CHAIN
% OK %
ROLLBACK | test_sql_parse_transaction_19 | python | geldata/gel | tests/test_sql_parse.py | https://github.com/geldata/gel/blob/master/tests/test_sql_parse.py | Apache-2.0 |
def test_sql_parse_transaction_20(self):
"""
ROLLBACK AND CHAIN
""" | ROLLBACK AND CHAIN | test_sql_parse_transaction_20 | python | geldata/gel | tests/test_sql_parse.py | https://github.com/geldata/gel/blob/master/tests/test_sql_parse.py | Apache-2.0 |
def test_sql_parse_transaction_21(self):
"""
SAVEPOINT some_id
""" | SAVEPOINT some_id | test_sql_parse_transaction_21 | python | geldata/gel | tests/test_sql_parse.py | https://github.com/geldata/gel/blob/master/tests/test_sql_parse.py | Apache-2.0 |
def test_sql_parse_transaction_22(self):
"""
RELEASE some_id
""" | RELEASE some_id | test_sql_parse_transaction_22 | python | geldata/gel | tests/test_sql_parse.py | https://github.com/geldata/gel/blob/master/tests/test_sql_parse.py | Apache-2.0 |
def test_sql_parse_transaction_23(self):
"""
ROLLBACK TO SAVEPOINT savepoint_name
""" | ROLLBACK TO SAVEPOINT savepoint_name | test_sql_parse_transaction_23 | python | geldata/gel | tests/test_sql_parse.py | https://github.com/geldata/gel/blob/master/tests/test_sql_parse.py | Apache-2.0 |
def test_sql_parse_transaction_24(self):
"""
PREPARE TRANSACTION 'transaction_id'
""" | PREPARE TRANSACTION 'transaction_id' | test_sql_parse_transaction_24 | python | geldata/gel | tests/test_sql_parse.py | https://github.com/geldata/gel/blob/master/tests/test_sql_parse.py | Apache-2.0 |
def test_sql_parse_transaction_25(self):
"""
COMMIT PREPARED 'transaction_id'
""" | COMMIT PREPARED 'transaction_id' | test_sql_parse_transaction_25 | python | geldata/gel | tests/test_sql_parse.py | https://github.com/geldata/gel/blob/master/tests/test_sql_parse.py | Apache-2.0 |
def test_sql_parse_transaction_26(self):
"""
ROLLBACK PREPARED 'transaction_id'
""" | ROLLBACK PREPARED 'transaction_id' | test_sql_parse_transaction_26 | python | geldata/gel | tests/test_sql_parse.py | https://github.com/geldata/gel/blob/master/tests/test_sql_parse.py | Apache-2.0 |
def test_sql_parse_transaction_27(self):
"""
SET TRANSACTION ISOLATION LEVEL SERIALIZABLE READ ONLY DEFERRABLE
""" | SET TRANSACTION ISOLATION LEVEL SERIALIZABLE READ ONLY DEFERRABLE | test_sql_parse_transaction_27 | python | geldata/gel | tests/test_sql_parse.py | https://github.com/geldata/gel/blob/master/tests/test_sql_parse.py | Apache-2.0 |
def test_sql_parse_transaction_28(self):
"""
SET SESSION CHARACTERISTICS AS TRANSACTION ISOLATION LEVEL SERIALIZABLE
""" | SET SESSION CHARACTERISTICS AS TRANSACTION ISOLATION LEVEL SERIALIZABLE | test_sql_parse_transaction_28 | python | geldata/gel | tests/test_sql_parse.py | https://github.com/geldata/gel/blob/master/tests/test_sql_parse.py | Apache-2.0 |
def test_sql_parse_query_00(self):
"""
SELECT * FROM
(VALUES (1, 'one'), (2, 'two')) AS t(num, letter)
""" | SELECT * FROM
(VALUES (1, 'one'), (2, 'two')) AS t(num, letter) | test_sql_parse_query_00 | python | geldata/gel | tests/test_sql_parse.py | https://github.com/geldata/gel/blob/master/tests/test_sql_parse.py | Apache-2.0 |
def test_sql_parse_query_01(self):
"""
SELECT * FROM my_table ORDER BY field ASC NULLS LAST USING @>
""" | SELECT * FROM my_table ORDER BY field ASC NULLS LAST USING @> | test_sql_parse_query_01 | python | geldata/gel | tests/test_sql_parse.py | https://github.com/geldata/gel/blob/master/tests/test_sql_parse.py | Apache-2.0 |
def test_sql_parse_query_02(self):
"""
SELECT m.* FROM mytable AS m FOR UPDATE
""" | SELECT m.* FROM mytable AS m FOR UPDATE | test_sql_parse_query_02 | python | geldata/gel | tests/test_sql_parse.py | https://github.com/geldata/gel/blob/master/tests/test_sql_parse.py | Apache-2.0 |
def test_sql_parse_query_03(self):
"""
SELECT m.* FROM mytable m FOR SHARE of m nowait
""" | SELECT m.* FROM mytable m FOR SHARE of m nowait | test_sql_parse_query_03 | python | geldata/gel | tests/test_sql_parse.py | https://github.com/geldata/gel/blob/master/tests/test_sql_parse.py | Apache-2.0 |
def test_sql_parse_query_04(self):
"""
SELECT * FROM unnest(ARRAY['a', 'b', 'c', 'd', 'e', 'f'])
""" | SELECT * FROM unnest(ARRAY['a', 'b', 'c', 'd', 'e', 'f']) | test_sql_parse_query_04 | python | geldata/gel | tests/test_sql_parse.py | https://github.com/geldata/gel/blob/master/tests/test_sql_parse.py | Apache-2.0 |
def test_sql_parse_query_06(self):
"""
SELECT ?
""" | SELECT ? | test_sql_parse_query_06 | python | geldata/gel | tests/test_sql_parse.py | https://github.com/geldata/gel/blob/master/tests/test_sql_parse.py | Apache-2.0 |
def test_sql_parse_query_07(self):
"""
SELECT * FROM x WHERE y = ?
""" | SELECT * FROM x WHERE y = ? | test_sql_parse_query_07 | python | geldata/gel | tests/test_sql_parse.py | https://github.com/geldata/gel/blob/master/tests/test_sql_parse.py | Apache-2.0 |
def test_sql_parse_query_08(self):
"""
SELECT * FROM x WHERE y = ANY ($1)
""" | SELECT * FROM x WHERE y = ANY ($1) | test_sql_parse_query_08 | python | geldata/gel | tests/test_sql_parse.py | https://github.com/geldata/gel/blob/master/tests/test_sql_parse.py | Apache-2.0 |
def test_sql_parse_query_09(self):
"""
PREPARE fooplan (int, text, bool, numeric) AS (SELECT $1, $2, $3, $4)
% OK %
PREPARE fooplan(pg_catalog.int4, text, bool, pg_catalog.numeric) AS (
SELECT $1, $2, $3, $4
)
""" | PREPARE fooplan (int, text, bool, numeric) AS (SELECT $1, $2, $3, $4)
% OK %
PREPARE fooplan(pg_catalog.int4, text, bool, pg_catalog.numeric) AS (
SELECT $1, $2, $3, $4
) | test_sql_parse_query_09 | python | geldata/gel | tests/test_sql_parse.py | https://github.com/geldata/gel/blob/master/tests/test_sql_parse.py | Apache-2.0 |
def test_sql_parse_query_10(self):
"""
EXECUTE fooplan(1, 'Hunter Valley', 't', 200.00)
""" | EXECUTE fooplan(1, 'Hunter Valley', 't', 200.00) | test_sql_parse_query_10 | python | geldata/gel | tests/test_sql_parse.py | https://github.com/geldata/gel/blob/master/tests/test_sql_parse.py | Apache-2.0 |
def test_sql_parse_query_11(self):
"""
DEALLOCATE a123
""" | DEALLOCATE a123 | test_sql_parse_query_11 | python | geldata/gel | tests/test_sql_parse.py | https://github.com/geldata/gel/blob/master/tests/test_sql_parse.py | Apache-2.0 |
def test_sql_parse_query_12(self):
"""
DEALLOCATE ALL
""" | DEALLOCATE ALL | test_sql_parse_query_12 | python | geldata/gel | tests/test_sql_parse.py | https://github.com/geldata/gel/blob/master/tests/test_sql_parse.py | Apache-2.0 |
def test_sql_parse_query_13(self):
"""
EXPLAIN ANALYZE SELECT a
""" | EXPLAIN ANALYZE SELECT a | test_sql_parse_query_13 | python | geldata/gel | tests/test_sql_parse.py | https://github.com/geldata/gel/blob/master/tests/test_sql_parse.py | Apache-2.0 |
def test_sql_parse_query_14(self):
"""
VACUUM FULL my_table
""" | VACUUM FULL my_table | test_sql_parse_query_14 | python | geldata/gel | tests/test_sql_parse.py | https://github.com/geldata/gel/blob/master/tests/test_sql_parse.py | Apache-2.0 |
def test_sql_parse_query_19(self):
"""
DECLARE cursor_123 CURSOR FOR
SELECT * FROM test WHERE id = 123
""" | DECLARE cursor_123 CURSOR FOR
SELECT * FROM test WHERE id = 123 | test_sql_parse_query_19 | python | geldata/gel | tests/test_sql_parse.py | https://github.com/geldata/gel/blob/master/tests/test_sql_parse.py | Apache-2.0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.