# HG changeset patch # User catherine@Elli.myhome.westell.com # Date 1238437974 14400 # Node ID 0473ad96ddb73b59d1230a9b50cf7f2843260590 # Parent 22fc9a350eaa8c2c884c9df5ad9606e0a889733a transcript tests work diff -r 22fc9a350eaa -r 0473ad96ddb7 sqlpython/exampleSession.txt --- a/sqlpython/exampleSession.txt Mon Mar 30 13:15:36 2009 -0400 +++ b/sqlpython/exampleSession.txt Mon Mar 30 14:32:54 2009 -0400 @@ -98,6 +98,7 @@ \h HTML table \i INSERT statements \j JSON +\r ReStructured Text \s CSV (with headings) \S CSV (no headings) \t transposed @@ -203,6 +204,7 @@ 2 rows selected. 0:testschema@orcl> set +abbrev: True autobind: False commit_on_exit: True continuation_prompt: > @@ -213,10 +215,10 @@ maxfetch: 1000 maxtselctrows: 10 prompt: 0:testschema@orcl> -result_history_max_mbytes: 10 scan: True serveroutput: True sql_echo: False +store_results: True timeout: 30 timing: False wildsql: False @@ -255,7 +257,8 @@ 1 row selected. 0:testschema@orcl> help grep -grep PATTERN TABLE - search for term in any of TABLE's fields +grep {target} {table} [{table2,...}] + search for {target} in any of {table}'s fields Usage: grep [options] arg Options: diff -r 22fc9a350eaa -r 0473ad96ddb7 sqlpython/sqlpyPlus.py --- a/sqlpython/sqlpyPlus.py Mon Mar 30 13:15:36 2009 -0400 +++ b/sqlpython/sqlpyPlus.py Mon Mar 30 14:32:54 2009 -0400 @@ -762,7 +762,7 @@ @options([make_option('-r', '--row', type="int", default=-1, help='Bind row #ROW instead of final row (zero-based)')]) - def do_bind(self, arg=None, opts={}): + def do_bind(self, arg, opts): ''' Inserts the results from the final row in the last completed SELECT statement into bind variables with names corresponding to the column names. When the optional @@ -816,7 +816,7 @@ elif self.rc == 1: print '\n1 row selected.\n' if self.autobind: - self.do_bind() + self.do_bind('') elif self.rc < self.maxfetch: print '\n%d rows selected.\n' % self.rc else: @@ -1472,7 +1472,8 @@ @options([make_option('-i', '--ignore-case', dest='ignorecase', action='store_true', help='Case-insensitive search')]) def do_grep(self, arg, opts): - """grep {target} {table} [{table2,...}] - search for {target} in any of {table}'s fields""" + """grep {target} {table} [{table2,...}] + search for {target} in any of {table}'s fields""" targetnames = arg.split() pattern = targetnames.pop(0)