Adding upstream version 26.0.0.
Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
parent
2ebe732d69
commit
522374f608
57 changed files with 26226 additions and 25977 deletions
|
@ -14,6 +14,10 @@ class TestParser(unittest.TestCase):
|
|||
parse_one("")
|
||||
|
||||
def test_parse_into(self):
|
||||
self.assertIsInstance(parse_one("(1)", into=exp.Tuple), exp.Tuple)
|
||||
self.assertIsInstance(parse_one("(1,)", into=exp.Tuple), exp.Tuple)
|
||||
self.assertIsInstance(parse_one("(x=1)", into=exp.Tuple), exp.Tuple)
|
||||
|
||||
self.assertIsInstance(parse_one("select * from t", into=exp.Select), exp.Select)
|
||||
self.assertIsInstance(parse_one("select * from t limit 5", into=exp.Select), exp.Select)
|
||||
self.assertIsInstance(parse_one("left join foo", into=exp.Join), exp.Join)
|
||||
|
@ -23,9 +27,9 @@ class TestParser(unittest.TestCase):
|
|||
self.assertIsInstance(
|
||||
parse_one(
|
||||
"WHEN MATCHED THEN UPDATE SET target.salary = COALESCE(source.salary, target.salary)",
|
||||
into=exp.When,
|
||||
into=exp.Whens,
|
||||
),
|
||||
exp.When,
|
||||
exp.Whens,
|
||||
)
|
||||
|
||||
with self.assertRaises(ParseError) as ctx:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue