Mercurial > sqlpython
changeset 500:17f5d69307a9
grep working in mysql
author | Catherine Devlin <catherine.devlin@gmail.com> |
---|---|
date | Mon, 01 Nov 2010 12:22:34 -0400 |
parents | eb7758a8b53a |
children | 1feb33957443 |
files | sqlpython/connections.py sqlpython/sqlpyPlus.py |
diffstat | 2 files changed, 3 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/sqlpython/connections.py Sat Oct 30 22:56:05 2010 -0400 +++ b/sqlpython/connections.py Mon Nov 01 12:22:34 2010 -0400 @@ -324,7 +324,8 @@ AND table_name %(name_op)s %(name)S ORDER BY table_schema, table_type, table_name %(sort_direction)s""" gerald_types = {'TABLE': gerald.mysql_schema.Table, - 'VIEW': gerald.mysql_schema.View} + 'VIEW': gerald.mysql_schema.View, + 'BASE TABLE': gerald.mysql_schema.Table} class PostgresInstance(DatabaseInstance):
--- a/sqlpython/sqlpyPlus.py Sat Oct 30 22:56:05 2010 -0400 +++ b/sqlpython/sqlpyPlus.py Mon Nov 01 12:22:34 2010 -0400 @@ -1571,7 +1571,7 @@ def _cast_as_char(self): 'self._cast_as_char() => Returns the RDBMS-equivalent "CAST(%s AS VARCHAR) expression.' - converter = {'oracle': 'TO_CHAR(%s)'}.get(self.rdbms, 'CAST(%s AS VARCHAR)') + converter = {'oracle': 'TO_CHAR(%s)', 'mysql': 'CAST(%s AS CHAR)'}.get(self.rdbms, 'CAST(%s AS VARCHAR)') return converter def _execute(self, sql, bindvars={}):