Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix column type conversion in SQLite3 driver #1293

Merged
merged 1 commit into from
Aug 5, 2023

Conversation

Jumpaku
Copy link
Contributor

@Jumpaku Jumpaku commented Aug 2, 2023

I found a bug in the SQLite3 driver related to column type conversion. The issue occurred when a column was not nullable, resulting in incorrect type conversion. Specifically, columns with types such as FLOAT(2, 1) or TYNYINT(1) were wrongly converted to string instead of float32 and int8 (although these types were correctly converted into null.Float32 and null.Int8 when the columns are nullable).

In this pull request, I have addressed this issue by fixing the column type conversion logic for non-nullable columns. Now, even if a column is not nullable, the types FLOAT(2, 1) and TYNYINT(1) are correctly converted to float32 and int8, respectively. Additionally, I have updated the relevant test cases to thoroughly verify that these type conversions work as intended.

@stephenafamo stephenafamo merged commit dc0cfbf into volatiletech:master Aug 5, 2023
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.

None yet

2 participants