comments are not properly parsed
DSLituiev opened this issue · 2 comments
DSLituiev commented
Example that fails:
qry="""SELECT * FROM INFORMATION_SCHEMA.TABLES -- look at this
WHERE table_name LIKE '%condition%' -- what a query!"""
%sql {qry}
Quick fix (at line 88 of magic.py):
line = re.sub(r'(--.*)$', '', line)
line = re.sub(r'(--.*)\n', '', line)
args = parse_argstring(self.execute, line)
catherinedevlin commented
There was an incompatibility between the new -- syntax for passing arguments, and SQL comment syntax. The trunk has a fix, please try it if you can - otherwise I should have 0.4.1 out in a week or so. Thanks!
stuaxo commented
Just hit this as well, how is 0.4.1 going ?