class MySQLDialect_oursql(MySQLDialect):
driver = 'oursql'
-# Py3K
-# description_encoding = None
# Py2K
supports_unicode_binds = True
supports_unicode_statements = True
execution_ctx_cls = PGExecutionContext_pg8000
statement_compiler = PGCompiler_pg8000
preparer = PGIdentifierPreparer_pg8000
+ description_encoding = 'use_encoding'
colspecs = util.update_copy(
PGDialect.colspecs,
class PGDialect_psycopg2(PGDialect):
driver = 'psycopg2'
+ # Py2K
supports_unicode_statements = False
+ # end Py2K
default_paramstyle = 'pyformat'
supports_sane_multi_rowcount = False
execution_ctx_cls = PGExecutionContext_psycopg2
#supports_unicode_statements = True
#supports_unicode_binds = True
#returns_unicode_strings = True
+ #description_encoding = None
# Py2K
supports_unicode_statements = False
supports_unicode_binds = False
returns_unicode_strings = False
+ description_encoding = 'use_encoding'
# end Py2K
(label_length, self.max_identifier_length))
self.label_length = label_length
- if not hasattr(self, 'description_encoding'):
- self.description_encoding = getattr(
- self,
- 'description_encoding',
- encoding)
-
- if self.description_encoding:
+ if self.description_encoding == 'use_encoding':
+ self._description_decoder = processors.to_unicode_processor_factory(
+ encoding
+ )
+ elif self.description_encoding is not None:
self._description_decoder = processors.to_unicode_processor_factory(
self.description_encoding
)