# HG changeset patch # User catherine@dellzilla # Date 1237482879 14400 # Node ID 8ea39093ddf2f0963ab5cc056f75d4c3c2b9f2d6 # Parent 3c5fa8ed4f8b7da9fc094eb22aee284265b6062c struggling with catching terminator after /* diff -r 3c5fa8ed4f8b -r 8ea39093ddf2 docs/source/capabilities.rst --- a/docs/source/capabilities.rst Thu Mar 19 10:15:02 2009 -0400 +++ b/docs/source/capabilities.rst Thu Mar 19 13:14:39 2009 -0400 @@ -75,7 +75,7 @@ ls Lists objects from the data dictionaries, as though they were in a - *object_type*/*object_name* directory structure. Thus, `ls view/` + *object_type*/*object_name* directory structure. Thus, `ls view/\*` lists all the user's views. cat diff -r 3c5fa8ed4f8b -r 8ea39093ddf2 sqlpython/sqlpyPlus.py --- a/sqlpython/sqlpyPlus.py Thu Mar 19 10:15:02 2009 -0400 +++ b/sqlpython/sqlpyPlus.py Thu Mar 19 13:14:39 2009 -0400 @@ -1233,13 +1233,9 @@ def _ls_statement(self, arg, opts): if arg: - target = arg.upper() - if hasattr(opts, 'exact') and opts.exact: - where = """\nWHERE object_name = '%s' - OR object_type || '/' || object_name = '%s'""" % \ - (target, target) - else: - where = "\nWHERE object_type || '/' || object_name LIKE '%s'" % (arg.upper().replace('*','%')) + target = arg.upper().replace('*','%') + where = """\nWHERE object_type || '/' || object_name LIKE '%s' + OR object_name LIKE '%s'""" % (target, target) else: where = '' if opts.all: @@ -1277,8 +1273,7 @@ @options([make_option('-l', '--long', action='store_true', help='long descriptions'), make_option('-a', '--all', action='store_true', help="all schemas' objects"), make_option('-t', '--timesort', action='store_true', help="Sort by last_ddl_time"), - make_option('-r', '--reverse', action='store_true', help="Reverse order while sorting"), - make_option('-x', '--exact', action='store_true', default=False, help="match name exactly")]) + make_option('-r', '--reverse', action='store_true', help="Reverse order while sorting")]) def do_ls(self, arg, opts): statement = '''SELECT object_type || '/' || %(objname)s AS name %(moreColumns)s FROM %(whose)s_objects %(where)s