From 7ab1d7c84daba103692f77698ccbd67af03773d9 Mon Sep 17 00:00:00 2001 From: Paul McGuire Date: Sun, 7 Aug 2016 14:54:01 +0000 Subject: Update to current pyparsing features --- src/examples/select_parser.py | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) (limited to 'src/examples/select_parser.py') diff --git a/src/examples/select_parser.py b/src/examples/select_parser.py index 7c53325..da106ac 100644 --- a/src/examples/select_parser.py +++ b/src/examples/select_parser.py @@ -112,8 +112,7 @@ tests = """\ select * from xyzzy where z > 100 select * from xyzzy where z > 100 order by zz select * from xyzzy - select z.* from xyzzy""".splitlines() -tests = """\ + select z.* from xyzzy select a, b from test_table where 1=1 and b='yes' select a, b from test_table where 1=1 and b in (select bb from foo) select z.a, b from test_table where 1=1 and b in (select bb from foo) @@ -122,13 +121,6 @@ tests = """\ select a, db.table.b as BBB from db.table where 1=1 and BBB='yes' select a, db.table.b as BBB from test_table,db.table where 1=1 and BBB='yes' select a, db.table.b as BBB from test_table,db.table where 1=1 and BBB='yes' limit 50 - """.splitlines() -for t in tests: - t = t.strip() - if not t: continue - print(t) - try: - print(select_stmt.parseString(t).dump()) - except ParseException as pe: - print(pe.msg) - print() + """ + +select_stmt.runTests(tests) -- cgit v1.2.1