Merging upstream version 10.0.8.
Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
parent
407314e8d2
commit
efc1e37108
67 changed files with 2461 additions and 840 deletions
|
@ -441,6 +441,9 @@ class TestExpressions(unittest.TestCase):
|
|||
self.assertIsInstance(parse_one("VARIANCE(a)"), exp.Variance)
|
||||
self.assertIsInstance(parse_one("VARIANCE_POP(a)"), exp.VariancePop)
|
||||
self.assertIsInstance(parse_one("YEAR(a)"), exp.Year)
|
||||
self.assertIsInstance(parse_one("BEGIN DEFERRED TRANSACTION"), exp.Transaction)
|
||||
self.assertIsInstance(parse_one("COMMIT"), exp.Commit)
|
||||
self.assertIsInstance(parse_one("ROLLBACK"), exp.Rollback)
|
||||
|
||||
def test_column(self):
|
||||
dot = parse_one("a.b.c")
|
||||
|
@ -479,9 +482,9 @@ class TestExpressions(unittest.TestCase):
|
|||
self.assertEqual(column.text("expression"), "c")
|
||||
self.assertEqual(column.text("y"), "")
|
||||
self.assertEqual(parse_one("select * from x.y").find(exp.Table).text("db"), "x")
|
||||
self.assertEqual(parse_one("select *").text("this"), "")
|
||||
self.assertEqual(parse_one("1 + 1").text("this"), "1")
|
||||
self.assertEqual(parse_one("'a'").text("this"), "a")
|
||||
self.assertEqual(parse_one("select *").name, "")
|
||||
self.assertEqual(parse_one("1 + 1").name, "1")
|
||||
self.assertEqual(parse_one("'a'").name, "a")
|
||||
|
||||
def test_alias(self):
|
||||
self.assertEqual(alias("foo", "bar").sql(), "foo AS bar")
|
||||
|
@ -538,8 +541,8 @@ class TestExpressions(unittest.TestCase):
|
|||
this=exp.Literal.string("TABLE_FORMAT"),
|
||||
value=exp.to_identifier("test_format"),
|
||||
),
|
||||
exp.EngineProperty(this=exp.Literal.string("ENGINE"), value=exp.NULL),
|
||||
exp.CollateProperty(this=exp.Literal.string("COLLATE"), value=exp.TRUE),
|
||||
exp.EngineProperty(this=exp.Literal.string("ENGINE"), value=exp.null()),
|
||||
exp.CollateProperty(this=exp.Literal.string("COLLATE"), value=exp.true()),
|
||||
]
|
||||
),
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue