Mercurial > sqlpython
changeset 280:8ea39093ddf2
struggling with catching terminator after /*
author | catherine@dellzilla |
---|---|
date | Thu, 19 Mar 2009 13:14:39 -0400 |
parents | 3c5fa8ed4f8b |
children | 701f0aae837a |
files | docs/source/capabilities.rst sqlpython/sqlpyPlus.py |
diffstat | 2 files changed, 5 insertions(+), 10 deletions(-) [+] |
line wrap: on
line diff
--- 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
--- 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