Mercurial > sqlpython
changeset 526:0b83bc94a1a1
accept suffix on SHOW PARAM also
author | Catherine Devlin <catherine.devlin@gmail.com> |
---|---|
date | Sat, 20 Nov 2010 09:21:51 -0500 |
parents | 4ec9438c0036 |
children | 9aeb875cd2b2 |
files | sqlpython/connections.py sqlpython/sqlpyPlus.py |
diffstat | 2 files changed, 4 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/sqlpython/connections.py Sat Nov 20 09:16:18 2010 -0500 +++ b/sqlpython/connections.py Sat Nov 20 09:21:51 2010 -0500 @@ -332,7 +332,7 @@ AND table_type %(type_op)s UPPER(%(type)S) AND table_name %(name_op)s LOWER(%(name)S) ORDER BY table_schema, table_type, table_name %(sort_direction)s""" - parameter_qry = """SHOW variables LIKE '%%%s%%'%s""" + parameter_qry = """SHOW variables LIKE '%%%s%%'%s%s""" gerald_types = {'TABLE': gerald.mysql_schema.Table, 'VIEW': gerald.mysql_schema.View, 'BASE TABLE': gerald.mysql_schema.Table, @@ -377,7 +377,7 @@ FROM information_schema.routines r WHERE ( (r.routine_schema %(owner_op)s LOWER(%(owner)S)) OR (r.routine_schema = 'public') ) AND LOWER(r.routine_definition) LIKE %(text)S""" - parameter_qry = """SELECT name, unit, setting FROM pg_settings WHERE name LIKE LOWER('%%%s%%')%s""" + parameter_qry = """SELECT name, unit, setting FROM pg_settings WHERE name LIKE LOWER('%%%s%%')%s%s""" gerald_types = {'BASE TABLE': gerald.postgres_schema.Table, 'VIEW': gerald.postgres_schema.View} @@ -447,7 +447,7 @@ WHEN 6 THEN 'BIG INTEGER' END type, value FROM v$parameter - WHERE name LIKE LOWER('%%%s%%')%s""" + WHERE name LIKE LOWER('%%%s%%')%s%s""" def source(self, target, opts): return self._source(target, opts) def bindSyntax(self, varname):
--- a/sqlpython/sqlpyPlus.py Sat Nov 20 09:16:18 2010 -0500 +++ b/sqlpython/sqlpyPlus.py Sat Nov 20 09:21:51 2010 -0500 @@ -908,7 +908,7 @@ def _param_select(self, arg, seekme): seekme = seekme.replace('*','%').replace('?','_') - query = self.parsed(self.current_instance.parameter_qry % (seekme, arg.parsed.terminator or ';')) + query = self.parsed(self.current_instance.parameter_qry % (seekme, arg.parsed.terminator or ';', arg.parsed.suffix)) return self.do_select(query) def do_show(self, arg):