]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
Support additional args/kwargs on cursor method
authorScott Dugas <scott.dugas@foundationdb.com>
Wed, 22 Oct 2014 19:09:05 +0000 (15:09 -0400)
committerScott Dugas <scott.dugas@foundationdb.com>
Wed, 22 Oct 2014 19:09:05 +0000 (15:09 -0400)
fdbsql has an optional nested kwarg, which is supported in the
actual code, but not in the testing proxy

lib/sqlalchemy/testing/engines.py

index 67c13231e9ca4709bd9ca1aa33f6a3b1a0327b9f..75bcc58e11ab42c17b4121635cbdb5e728abf120 100644 (file)
@@ -284,10 +284,10 @@ class DBAPIProxyCursor(object):
 
     """
 
-    def __init__(self, engine, conn):
+    def __init__(self, engine, conn, *args, **kwargs):
         self.engine = engine
         self.connection = conn
-        self.cursor = conn.cursor()
+        self.cursor = conn.cursor(*args, **kwargs)
 
     def execute(self, stmt, parameters=None, **kw):
         if parameters:
@@ -315,8 +315,10 @@ class DBAPIProxyConnection(object):
         self.engine = engine
         self.cursor_cls = cursor_cls
 
-    def cursor(self):
-        return self.cursor_cls(self.engine, self.conn)
+    def cursor(self, *args, **kwargs):
+        print "DPA", args
+        print "DPK", kwargs
+        return self.cursor_cls(self.engine, self.conn, *args, **kwargs)
 
     def close(self):
         self.conn.close()