]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
- [bug] changed the list of cx_oracle types that are
authorMike Bayer <mike_mp@zzzcomputing.com>
Wed, 10 Oct 2012 17:22:57 +0000 (13:22 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Wed, 10 Oct 2012 17:22:57 +0000 (13:22 -0400)
    excluded from the setinputsizes() step to only include
    STRING and UNICODE; CLOB and NCLOB are removed.  This
    is to work around cx_oracle behavior which is broken
    for the executemany() call.  In 0.8, this same change
    is applied however it is also configurable via the
    exclude_setinputsizes argument. [ticket:2561]

CHANGES
lib/sqlalchemy/dialects/oracle/cx_oracle.py

diff --git a/CHANGES b/CHANGES
index 9b1bb4e6dec79f764773306735fcb273d5771498..0c795c27152695205469e582fb5672eb680fd922 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -15,6 +15,15 @@ CHANGES
     or by primary key switch of another instance.
     [ticket:2583]
 
+- oracle
+  - [bug] changed the list of cx_oracle types that are
+    excluded from the setinputsizes() step to only include
+    STRING and UNICODE; CLOB and NCLOB are removed.  This
+    is to work around cx_oracle behavior which is broken
+    for the executemany() call.  In 0.8, this same change
+    is applied however it is also configurable via the
+    exclude_setinputsizes argument. [ticket:2561]
+
 - mysql
   - [feature] Added "raise_on_warnings" flag to OurSQL
     dialect.  [ticket:2523]
index 116f6ada788e2f1f46c52f3c6cdd44e1ef180679..dbf53b0ea2cd27012291d783c4a9c49c5081d528 100644 (file)
@@ -337,7 +337,7 @@ class OracleExecutionContext_cx_oracle(OracleExecutionContext):
             # on String, including that outparams/RETURNING
             # breaks for varchars
             self.set_input_sizes(quoted_bind_names,
-                                 exclude_types=self.dialect._cx_oracle_string_types
+                                 exclude_types=self.dialect._cx_oracle_exclude_setinputsizes
                                 )
 
         # if a single execute, check for outparams
@@ -507,6 +507,7 @@ class OracleDialect_cx_oracle(OracleDialect):
                         getattr(self.dbapi, name, None) for name in names
                     ]).difference([None])
 
+        self._cx_oracle_exclude_setinputsizes = types("STRING", "UNICODE")
         self._cx_oracle_string_types = types("STRING", "UNICODE", "NCLOB", "CLOB")
         self._cx_oracle_unicode_types = types("UNICODE", "NCLOB")
         self._cx_oracle_binary_types = types("BFILE", "CLOB", "NCLOB", "BLOB")