Skip to content

Fine tune SQL_C_TYPES#42

Merged
peytondmurray merged 1 commit intoQuansight:mainfrom
peytondmurray:89-binary-followup
Nov 19, 2024
Merged

Fine tune SQL_C_TYPES#42
peytondmurray merged 1 commit intoQuansight:mainfrom
peytondmurray:89-binary-followup

Conversation

@peytondmurray
Copy link
Collaborator

@peytondmurray peytondmurray commented Nov 19, 2024

This PR more carefully sets the SQL_C_TYPES, building on #40.

There's scant documentation about the effect the TargetType argument of SQLBindCol has on the values that get written to a buffer.

After some additional testing, using SQL_C_BINARY as the TargetType avoids storing BLOB columns as hexadecimal-in-strings with sqlite, greatly improving the user experience. With that, I've also associated SQL_C_TYPES with numpy types for (un)signed integers. Finally, I added some more testing to make sure that type coercion works with other types.

@peytondmurray peytondmurray merged commit 9461a1c into Quansight:main Nov 19, 2024
@peytondmurray peytondmurray deleted the 89-binary-followup branch November 19, 2024 06:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant