# HG changeset patch # User catherine@Elli.myhome.westell.com # Date 1233368834 18000 # Node ID 3a59ca05f9801f996f58b02ef397f3fded32501d # Parent 01af6bfbe78f29d51e965afdf210f549740cb549 added show parameter diff -r 01af6bfbe78f -r 3a59ca05f980 sqlpython/sqlpyPlus.py --- a/sqlpython/sqlpyPlus.py Fri Jan 30 05:52:49 2009 -0500 +++ b/sqlpython/sqlpyPlus.py Fri Jan 30 21:27:14 2009 -0500 @@ -585,6 +585,28 @@ if opts.dump: statekeeper.restore() + def do_show(self, arg): + ''' + show - display value of all sqlpython parameters + show (parameter name) - display value of a sqlpython parameter + show parameter (parameter name) - display value of an ORACLE parameter + ''' + if arg.startswith('param'): + try: + paramname = arg.split()[1].lower() + except IndexError: + paramname = '' + self.onecmd("""SELECT name, + CASE type WHEN 1 THEN 'BOOLEAN' + WHEN 2 THEN 'STRING' + WHEN 3 THEN 'INTEGER' + WHEN 4 THEN 'PARAMETER FILE' + WHEN 5 THEN 'RESERVED' + WHEN 6 THEN 'BIG INTEGER' END type, + value FROM v$parameter WHERE name LIKE '%%%s%%';""" % paramname) + else: + return Cmd.do_show(self, arg) + @options([make_option('-d', '--dump', action='store_true', help='dump results to files'), make_option('-f', '--full', action='store_true', help='get dependent objects as well'), make_option('-a', '--all', action='store_true', help="all schemas' objects"),