Skip to content

Commit 258a3e1

Browse files
committed
fix linting
1 parent 53b696e commit 258a3e1

2 files changed

Lines changed: 134 additions & 82 deletions

File tree

mssql_python/pybind/ddbc_bindings.cpp

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

3445
#define STRINGIFY_FOR_CASE(x) \
3546
case x: \
@@ -2931,14 +2942,14 @@ SQLSMALLINT MapVariantCTypeToSQLType(SQLLEN variantCType) {
29312942
return SQL_VARCHAR;
29322943
case SQL_C_WCHAR:
29332944
return SQL_WVARCHAR;
2934-
case 9:
2945+
case SQL_C_DATE:
29352946
case SQL_C_TYPE_DATE:
29362947
return SQL_TYPE_DATE;
2937-
case 10:
2948+
case SQL_C_TIME:
29382949
case SQL_C_TYPE_TIME:
2939-
case 16384:
2950+
case SQL_SS_VARIANT_TIME:
29402951
return SQL_TYPE_TIME;
2941-
case 11:
2952+
case SQL_C_TIMESTAMP:
29422953
case SQL_C_TYPE_TIMESTAMP:
29432954
return SQL_TYPE_TIMESTAMP;
29442955
case SQL_C_BINARY:
@@ -4280,9 +4291,6 @@ SQLRETURN FetchAll_wrap(SqlHandlePtr StatementHandle, py::list& rows,
42804291
SQLSMALLINT dataType = colMeta["DataType"].cast<SQLSMALLINT>();
42814292
SQLULEN columnSize = colMeta["ColumnSize"].cast<SQLULEN>();
42824293

4283-
printf("[DEBUG] FetchAll_wrap: Column %d - dataType=%d, columnSize=%lu\n", i + 1, dataType,
4284-
(unsigned long)columnSize);
4285-
42864294
// Detect LOB columns that need SQLGetData streaming
42874295
// sql_variant always uses SQLGetData for native type preservation
42884296
if (dataType == SQL_SS_VARIANT ||

0 commit comments

Comments
 (0)