description names from zxJDBC
+import sys
from sqlalchemy.connectors import Connector
class ZxJDBCConnector(Connector):
supports_sane_multi_rowcount = False
supports_unicode_binds = True
- supports_unicode_statements = False
+ supports_unicode_statements = sys.version > '2.5.0+'
default_paramstyle = 'qmark'
jdbc_db_name = None
for i, (colname, coltype) in enumerate(metadata):
- if self.dialect.description_encoding:
+ if self.dialect.description_encoding and not isinstance(colname, unicode):
colname = colname.decode(self.dialect.description_encoding)
if '.' in colname: