# HG changeset patch # User Catherine Devlin # Date 1288628554 14400 # Node ID 17f5d69307a913a666024d1ec6d3006d97ac2807 # Parent eb7758a8b53acd28c43e2ceafde08b6a9ac304fe grep working in mysql diff -r eb7758a8b53a -r 17f5d69307a9 sqlpython/connections.py --- 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): diff -r eb7758a8b53a -r 17f5d69307a9 sqlpython/sqlpyPlus.py --- 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={}):