changeset 240:6d9a65b442b5

negative wildcards fixed
author catherine@Elli.myhome.westell.com
date Fri, 27 Feb 2009 16:12:35 -0500
parents 4c563c2218e6
children d1f1022d2387
files sqlpython/sqlpyPlus.py
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/sqlpython/sqlpyPlus.py	Fri Feb 27 12:06:40 2009 -0500
+++ b/sqlpython/sqlpyPlus.py	Fri Feb 27 16:12:35 2009 -0500
@@ -371,7 +371,7 @@
         self.spoolFile = None
         self.autobind = False
         self.heading = True
-        self.wildsql = True
+        self.wildsql = False
 
     # overrides cmd's parseline
     def parseline(self, line):
@@ -547,7 +547,7 @@
                     included.discard(colname)
                     include_here = columns_available[:]
                     include_here.remove(colname)
-                    replacers[arg[startpos:endpos]].extend(include_here)
+                    replacers[arg[startpos:endpos]].extend(i for i in include_here if i not in replacers[arg[startpos:endpos]])
                     excluded.add(colname)
                 else:
                     #included.add(colname)
@@ -558,6 +558,7 @@
         result = columnlist.columns
         for (target, replacement) in replacers:
             cols = [r for r in replacement if r not in excluded and r not in included]
+            
             replacement = ', '.join(cols)
             included.update(cols)
             result = result.replace(target, replacement)