]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
use supports_unicode_statements on Jython trunk and handle unicode cursor
authorPhilip Jenvey <pjenvey@underboss.org>
Tue, 21 Jul 2009 03:10:53 +0000 (03:10 +0000)
committerPhilip Jenvey <pjenvey@underboss.org>
Tue, 21 Jul 2009 03:10:53 +0000 (03:10 +0000)
description names from zxJDBC

lib/sqlalchemy/connectors/zxJDBC.py
lib/sqlalchemy/engine/base.py

index 2d4d713727ab3ce3d434a133b6a31ce690ef4d4e..9d91b30ed13b0f4f99870b7ba3e73c2c85cb7376 100644 (file)
@@ -1,3 +1,4 @@
+import sys
 from sqlalchemy.connectors import Connector
 
 class ZxJDBCConnector(Connector):
@@ -7,7 +8,7 @@ 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
index 7fff18d0239fbea58dcd886d32cd7805875555be..c3aeb54515bceeea8f1fd1a81538a58fd64419e3 100644 (file)
@@ -1639,7 +1639,7 @@ class ResultProxy(object):
 
         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: