summaryrefslogtreecommitdiffstats
path: root/tests/test_build.py
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2022-10-15 13:52:53 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2022-10-15 13:52:53 +0000
commit97d3673ec2d668050912aa6aea1816885ca6c5ab (patch)
treef391e30e039a3d22368e9696e171f759e104c765 /tests/test_build.py
parentAdding upstream version 6.3.1. (diff)
downloadsqlglot-97d3673ec2d668050912aa6aea1816885ca6c5ab.tar.xz
sqlglot-97d3673ec2d668050912aa6aea1816885ca6c5ab.zip
Adding upstream version 7.1.3.upstream/7.1.3
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/test_build.py')
-rw-r--r--tests/test_build.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/test_build.py b/tests/test_build.py
index fa9e7f8..a432ef1 100644
--- a/tests/test_build.py
+++ b/tests/test_build.py
@@ -381,6 +381,11 @@ class TestBuild(unittest.TestCase):
lambda: alias(parse_one("LAG(x) OVER ()"), "a"),
"LAG(x) OVER () AS a",
),
+ (lambda: exp.values([("1", 2)]), "VALUES ('1', 2)"),
+ (lambda: exp.values([("1", 2)], "alias"), "(VALUES ('1', 2)) AS alias"),
+ (lambda: exp.values([("1", 2), ("2", 3)]), "VALUES ('1', 2), ('2', 3)"),
+ (lambda: exp.delete("y", where="x > 1"), "DELETE FROM y WHERE x > 1"),
+ (lambda: exp.delete("y", where=exp.and_("x > 1")), "DELETE FROM y WHERE x > 1"),
]:
with self.subTest(sql):
self.assertEqual(expression().sql(dialect[0] if dialect else None), sql)