changeset 239:4c563c2218e6

catching standard names caught
author catherine@Elli.myhome.westell.com
date Fri, 27 Feb 2009 12:06:40 -0500
parents 254fb9d3f4c3
children 6d9a65b442b5
files sqlpython/sqlpyPlus.py
diffstat 1 files changed, 7 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/sqlpython/sqlpyPlus.py	Fri Feb 27 07:17:18 2009 -0500
+++ b/sqlpython/sqlpyPlus.py	Fri Feb 27 12:06:40 2009 -0500
@@ -514,6 +514,13 @@
         except pyparsing.ParseException:
             return arg
         parseresults = list(self.wildSqlParser.scanString(columnlist.columns))
+        # I would rather exclude non-wild column names in the grammar,
+        # but can't figure out how
+        parseresults = [p for p in parseresults if 
+                        p[0].column_number or 
+                        '*' in p[0].column_name or
+                        '%' in p[0].column_name or
+                        p[0].exclude]
         if not parseresults:
             return arg       
         self.curs.execute('select * ' + columnlist.remainder, self.varsUsed)