]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
- further mxodbc tweaks affecting other test suites
authorMike Bayer <mike_mp@zzzcomputing.com>
Sun, 2 Sep 2012 20:17:10 +0000 (16:17 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Sun, 2 Sep 2012 20:17:10 +0000 (16:17 -0400)
lib/sqlalchemy/connectors/mxodbc.py
test/dialect/test_mssql.py
test/dialect/test_mxodbc.py

index 752c8b6b05550d7511757aba0aeccbd97aefcb5a..69a8677e4295552e88aed3632cb146f04ef222e2 100644 (file)
@@ -131,7 +131,6 @@ class MxODBCConnector(Connector):
         return tuple(version)
 
     def _get_direct(self, context):
-        return True
         if context:
             native_odbc_execute = context.execution_options.\
                                         get('native_odbc_execute', 'auto')
index 1c6f8d02ae14039df07e0347f7df24162c4232c3..c083a489997449fb3098933a211b6329532dc8ee 100644 (file)
@@ -170,15 +170,6 @@ class CompileTest(fixtures.TestBase, AssertsCompiledSQL):
                 select([t]).where(t.c.foo.in_(['x', 'y', 'z'])),
                 "SELECT sometable.foo FROM sometable WHERE sometable.foo "
                 "IN ('x', 'y', 'z')",
-            ),
-            (
-                func.foobar("x", "y", 4, 5),
-                "foobar('x', 'y', 4, 5)",
-            ),
-            (
-                select([t]).where(func.len('xyz') > func.len(t.c.foo)),
-                "SELECT sometable.foo FROM sometable WHERE len('xyz') > "
-                "len(sometable.foo)",
             )
         ]:
             self.assert_compile(expr, compile, dialect=mxodbc_dialect)
index 78f8ba69820c6623023dd2e9ae7e1e40358ac8f2..285b8863f87e2dd1bf2b8b4562f43d0c0a68c58c 100644 (file)
@@ -30,7 +30,10 @@ class MockCursor(object):
     def __init__(self, parent):
         self.parent = parent
     def execute(self, *args, **kwargs):
-        self.parent.parent.log.append('execute')
+        if kwargs.get('direct', False):
+            self.executedirect()
+        else:
+            self.parent.parent.log.append('execute')
     def executedirect(self, *args, **kwargs):
         self.parent.parent.log.append('executedirect')
     def close(self):