Skip to content

Commit a1ec891

Browse files
committed
fix linting
1 parent b27027e commit a1ec891

File tree

2 files changed

+134
-82
lines changed

2 files changed

+134
-82
lines changed

mssql_python/pybind/ddbc_bindings.cpp

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,17 @@
2929
#define SQL_SS_XML (-152)
3030
#define SQL_SS_VARIANT (-150)
3131
#define SQL_CA_SS_VARIANT_TYPE (1215)
32+
#ifndef SQL_C_DATE
33+
#define SQL_C_DATE (9)
34+
#endif
35+
#ifndef SQL_C_TIME
36+
#define SQL_C_TIME (10)
37+
#endif
38+
#ifndef SQL_C_TIMESTAMP
39+
#define SQL_C_TIMESTAMP (11)
40+
#endif
41+
// SQL Server-specific variant TIME type code
42+
#define SQL_SS_VARIANT_TIME (16384)
3243

3344
#define STRINGIFY_FOR_CASE(x) \
3445
case x: \
@@ -2916,14 +2927,14 @@ SQLSMALLINT MapVariantCTypeToSQLType(SQLLEN variantCType) {
29162927
return SQL_VARCHAR;
29172928
case SQL_C_WCHAR:
29182929
return SQL_WVARCHAR;
2919-
case 9:
2930+
case SQL_C_DATE:
29202931
case SQL_C_TYPE_DATE:
29212932
return SQL_TYPE_DATE;
2922-
case 10:
2933+
case SQL_C_TIME:
29232934
case SQL_C_TYPE_TIME:
2924-
case 16384:
2935+
case SQL_SS_VARIANT_TIME:
29252936
return SQL_TYPE_TIME;
2926-
case 11:
2937+
case SQL_C_TIMESTAMP:
29272938
case SQL_C_TYPE_TIMESTAMP:
29282939
return SQL_TYPE_TIMESTAMP;
29292940
case SQL_C_BINARY:
@@ -4206,9 +4217,6 @@ SQLRETURN FetchAll_wrap(SqlHandlePtr StatementHandle, py::list& rows,
42064217
SQLSMALLINT dataType = colMeta["DataType"].cast<SQLSMALLINT>();
42074218
SQLULEN columnSize = colMeta["ColumnSize"].cast<SQLULEN>();
42084219

4209-
printf("[DEBUG] FetchAll_wrap: Column %d - dataType=%d, columnSize=%lu\n", i + 1, dataType,
4210-
(unsigned long)columnSize);
4211-
42124220
// Detect LOB columns that need SQLGetData streaming
42134221
// sql_variant always uses SQLGetData for native type preservation
42144222
if (dataType == SQL_SS_VARIANT ||

0 commit comments

Comments
 (0)