]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
- we dont actually need this unicode cast, on py3k + linux it seems the
authorMike Bayer <mike_mp@zzzcomputing.com>
Tue, 9 Jul 2013 15:52:31 +0000 (11:52 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Tue, 9 Jul 2013 15:52:31 +0000 (11:52 -0400)
has_table issues are OK.  On OSX forget it.
- still some issues with PY3k + pyodbc + decimal values it doesn't expect, not sure

lib/sqlalchemy/dialects/mssql/base.py
lib/sqlalchemy/dialects/mssql/information_schema.py
test/sql/test_query.py

index 3c329fe5e50b2277749b2ba62d9c62be79a34f40..7621f4aabe965661e8b4cb992ec1406d8e4bfe78 100644 (file)
@@ -1161,17 +1161,11 @@ class MSDialect(default.DefaultDialect):
                 pass
         return self.schema_name
 
-    def _unicode_cast(self, column):
-        if self.server_version_info >= MS_2005_VERSION:
-            return cast(column, NVARCHAR(_warn_on_bytestring=False))
-        else:
-            return column
-
     @_db_plus_owner
     def has_table(self, connection, tablename, dbname, owner, schema):
         columns = ischema.columns
 
-        whereclause = self._unicode_cast(columns.c.table_name) == tablename
+        whereclause = columns.c.table_name == tablename
 
         if owner:
             whereclause = sql.and_(whereclause,
index c0d5d91681ea994865337d73f260cf9d51450e0c..7ac1b703e277d717553f46219a4aef4db3c3afc4 100644 (file)
@@ -7,7 +7,7 @@
 # TODO: should be using the sys. catalog with SQL Server, not information schema
 
 from ... import Table, MetaData, Column
-from ...types import String, Unicode, Integer, TypeDecorator
+from ...types import String, Unicode, UnicodeText, Integer, TypeDecorator
 from ... import cast
 from ... import util
 from ...sql import expression
index 0ed429850c0c4976236fd47365fd773ad978f466..39c8962666a10554951c72608fd455b10d3bcd3c 100644 (file)
@@ -1370,6 +1370,8 @@ class TableInsertTest(fixtures.TablesTest):
             inserted_primary_key=[1]
         )
 
+    @testing.crashes("mssql+pyodbc",
+            "Pyodbc + SQL Server + Py3K, some decimal handling issue")
     def test_uppercase_inline_implicit(self):
         t = self.tables.foo
         self._test(