diff sqlpyPlus.py @ 138:3b3c78bad48f

need completion too
author catherine@Elli.myhome.westell.com
date Fri, 29 Aug 2008 09:54:12 -0400
parents c27eeeea8752
children 5a021524805a
line wrap: on
line diff
--- a/sqlpyPlus.py	Thu Aug 28 08:27:52 2008 -0400
+++ b/sqlpyPlus.py	Fri Aug 29 09:54:12 2008 -0400
@@ -12,6 +12,7 @@
  - comments shows table and column comments
  - compare ... to ... graphically compares results of two queries
  - commands are case-insensitive
+ - context-sensitive tab-completion for table names, column names, etc.
 
 Use 'help' within sqlpython for details.
 
@@ -530,6 +531,7 @@
                 columnNames = [c.strip().upper() for c in columnNames.split(',')]
                 stmt1 = "SELECT table_name FROM all_tab_columns WHERE column_name = '%s' AND table_name LIKE '%s%%'"
                 for columnName in columnNames:
+                    # and if columnName is * ?
                     completions.extend(self.select_scalar_list(stmt1 % (columnName, text)))                    
         if segment in ('from', 'update', 'insert into') and (not completions):
             stmt = "SELECT table_name FROM user_tables WHERE table_name LIKE '%s%%'"