FEAT: Add spatial type support (geography, geometry, hierarchyid) #422
+1,113
−2
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Work Item / Issue Reference
Summary
Adds
SQL_SS_UDT(-151) handling sogeography,geometry, andhierarchyidcolumns are fetched asbytesinstead of raising errors. These SQL Server CLR User-Defined Types all report asSQL_SS_UDTvia ODBC and were previously unhandled in both the C++ binding layer and Python type maps.Changes
ddbc_bindings.cppSQL_SS_UDTconstant; addcase SQL_SS_UDT:fallthroughs toSQL_BINARYinSQLGetData_wrap,SQLBindColums, andFetchBatchData; separatecalculateRowSizecase with LOB-size fallback; include in LOB detection forFetchMany_wrapandFetchAll_wrapconstants.pySQL_SS_UDT = -151toConstantsDDBCenumcursor.pySQL_SS_UDT -> SQL_C_BINARYinsql_to_c_typemap; addSQL_SS_UDT -> bytesinsql_to_python_typemaptest_017_spatial_types.pyTesting
ddbc_bindings.cp313-arm64.pydwith 0 errorstest_no_segfault_on_gcWinError 50), 8 skipped