diff options
Diffstat (limited to 'lib/sqlalchemy/connectors/pyodbc.py')
-rw-r--r-- | lib/sqlalchemy/connectors/pyodbc.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/sqlalchemy/connectors/pyodbc.py b/lib/sqlalchemy/connectors/pyodbc.py index e24acda75..7c5e62fae 100644 --- a/lib/sqlalchemy/connectors/pyodbc.py +++ b/lib/sqlalchemy/connectors/pyodbc.py @@ -42,6 +42,8 @@ class PyODBCConnector(Connector): supports_native_decimal = True default_paramstyle = "named" + fast_executemany = False + # for non-DSN connections, this *may* be used to # hold the desired driver name pyodbc_driver_name: Optional[str] = None @@ -203,6 +205,13 @@ class PyODBCConnector(Connector): # parameter were not passed to the dialect, or if no types were # specified in list_of_tuples + # as of #8177 for 2.0 we assume use_setinputsizes=True and only + # omit the setinputsizes calls for .executemany() with + # fast_executemany=True + + if context.executemany and self.fast_executemany: + return + cursor.setinputsizes( [ (dbtype, None, None) |