Skip to content

Commit af90409

Browse files
committed
Removed the dead executemany() SQL_UNKNOWN_TYPE check. That path is no longer reachable since _map_sql_type(None) now returns SQL_VARCHAR directly.
1 parent b6f1478 commit af90409

1 file changed

Lines changed: 0 additions & 9 deletions

File tree

‎mssql_python/cursor.py‎

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2342,15 +2342,6 @@ def executemany( # pylint: disable=too-many-locals,too-many-branches,too-many-s
23422342
max_val=max_val,
23432343
)
23442344

2345-
# For executemany with all-NULL columns, SQL_UNKNOWN_TYPE doesn't work
2346-
# with array binding. Fall back to SQL_VARCHAR as a safe default.
2347-
if (
2348-
sample_value is None
2349-
and paraminfo.paramSQLType == ddbc_sql_const.SQL_UNKNOWN_TYPE.value
2350-
):
2351-
paraminfo.paramSQLType = ddbc_sql_const.SQL_VARCHAR.value
2352-
paraminfo.columnSize = 1
2353-
23542345
# Correct column size for Decimal columns sent as SQL_VARCHAR (GH-557).
23552346
# The sample value's formatted string may be shorter than another
23562347
# row's (e.g. positive sample "1.0" = 3 chars vs negative "-0.1" = 4).

0 commit comments

Comments
 (0)