Commit ce4f8c5
committed
fix: output converter lookup by SQL type code, not Python type
_build_converter_map looked up converters using desc[1] (the mapped
Python type, e.g. bytes) but add_output_converter registers by SQL
type code (e.g. -151). Added _column_sql_types to Cursor so the
converter map tries the raw SQL code first, then falls back to
Python type, then WVARCHAR.
Also fixes the output converter test to register by SQL_SS_UDT (-151)
instead of bytes, and adds docstrings to _get_c_type_for_sql_type and
_map_data_type documenting the SQL Server-specific types.1 parent fde7ea4 commit ce4f8c5
2 files changed
Lines changed: 22 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
943 | 943 | | |
944 | 944 | | |
945 | 945 | | |
| 946 | + | |
946 | 947 | | |
947 | 948 | | |
948 | 949 | | |
| 950 | + | |
949 | 951 | | |
950 | 952 | | |
951 | 953 | | |
| |||
954 | 956 | | |
955 | 957 | | |
956 | 958 | | |
| 959 | + | |
| 960 | + | |
957 | 961 | | |
958 | 962 | | |
959 | 963 | | |
| |||
967 | 971 | | |
968 | 972 | | |
969 | 973 | | |
| 974 | + | |
970 | 975 | | |
971 | 976 | | |
972 | 977 | | |
| |||
982 | 987 | | |
983 | 988 | | |
984 | 989 | | |
| 990 | + | |
985 | 991 | | |
986 | | - | |
| 992 | + | |
987 | 993 | | |
988 | 994 | | |
989 | 995 | | |
990 | | - | |
991 | | - | |
992 | | - | |
| 996 | + | |
| 997 | + | |
| 998 | + | |
| 999 | + | |
| 1000 | + | |
| 1001 | + | |
| 1002 | + | |
| 1003 | + | |
| 1004 | + | |
| 1005 | + | |
| 1006 | + | |
| 1007 | + | |
993 | 1008 | | |
994 | 1009 | | |
995 | 1010 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
304 | 304 | | |
305 | 305 | | |
306 | 306 | | |
307 | | - | |
| 307 | + | |
| 308 | + | |
308 | 309 | | |
309 | 310 | | |
310 | 311 | | |
311 | 312 | | |
312 | 313 | | |
313 | 314 | | |
314 | | - | |
| 315 | + | |
315 | 316 | | |
316 | 317 | | |
317 | 318 | | |
| |||
0 commit comments