1
0
Fork 0

Adding upstream version 26.0.0.

Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
Daniel Baumann 2025-02-13 21:58:31 +01:00
parent 2ebe732d69
commit 522374f608
Signed by: daniel
GPG key ID: FBB4F0E80A80222F
57 changed files with 26226 additions and 25977 deletions

View file

@ -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: