diff options
Diffstat (limited to 'tests/test_build.py')
-rw-r--r-- | tests/test_build.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/test_build.py b/tests/test_build.py index 087bc7e..817b609 100644 --- a/tests/test_build.py +++ b/tests/test_build.py @@ -86,6 +86,8 @@ class TestBuild(unittest.TestCase): "CASE x WHEN 1 THEN x ELSE bar END", ), (lambda: exp.func("COALESCE", "x", 1), "COALESCE(x, 1)"), + (lambda: exp.column("x").desc(), "x DESC"), + (lambda: exp.column("x").desc(nulls_first=True), "x DESC NULLS FIRST"), (lambda: select("x"), "SELECT x"), (lambda: select("x"), "SELECT x"), (lambda: select("x", "y"), "SELECT x, y"), @@ -631,6 +633,10 @@ class TestBuild(unittest.TestCase): "INSERT INTO tbl (cola, colb) VALUES (1, 2), (3, 4)", ), ( + lambda: exp.insert("VALUES (1), (2)", "tbl", columns=["col a"]), + 'INSERT INTO tbl ("col a") VALUES (1), (2)', + ), + ( lambda: exp.insert("SELECT * FROM cte", "t").with_("cte", as_="SELECT x FROM tbl"), "WITH cte AS (SELECT x FROM tbl) INSERT INTO t SELECT * FROM cte", ), |