Commits

Mike Bayer committed e69005c

- further mxodbc tweaks affecting other test suites

  • Participants
  • Parent commits 0ad54e6

Comments (0)

Files changed (3)

File lib/sqlalchemy/connectors/mxodbc.py

         return tuple(version)
 
     def _get_direct(self, context):
-        return True
         if context:
             native_odbc_execute = context.execution_options.\
                                         get('native_odbc_execute', 'auto')

File test/dialect/test_mssql.py

                 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)

File test/dialect/test_mxodbc.py

     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):