1. Atsushi Odagiri
  2. sqlalchemy-namedfilter


Mike Bayer  committed 11acff2

inlined encoding of result column names

  • Participants
  • Parent commits 3d04904
  • Branches default

Comments (0)

Files changed (2)

File lib/sqlalchemy/engine/base.py

View file
             for i, item in enumerate(metadata):
                 # sqlite possibly prepending table name to colnames so strip
-                colname = self.dialect.decode_result_columnname(item[0].split('.')[-1])
+                colname = (item[0].split('.')[-1]).decode(self.dialect.encoding)
                 if self.context.typemap is not None:
                     type = self.context.typemap.get(colname.lower(), typemap.get(item[1], types.NULLTYPE))

File lib/sqlalchemy/engine/default.py

View file
         self.dbapi = dbapi
         self._figure_paramstyle(paramstyle=paramstyle, default=default_paramstyle)
-    def decode_result_columnname(self, name):
-        """decode a name found in cursor.description to a unicode object."""
-        return name.decode(self.encoding)
     def dbapi_type_map(self):
         # most DBAPIs have problems with this (such as, psycocpg2 types 
         # are unhashable).  So far Oracle can return it.