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
map SQL dates and times to DateTime #42
Conversation
Hi fsw. ThI think because this library is still not in stable semver we can just bump minor version and write changelog. I will check your PR in a few days |
Yes, I guess minor bump would be OK. I am not sure what to do with sql TIME type, but I guess this one should be passed as String and not converted to DateTime. I will fix this and add some tests. |
Yes, TIME should be just String |
added some changes:
Few things I noticed while adding types mapping test:
|
I think if we convert year to INT now, users will expect that numbers will be converted to numbers or at least to BigInt. So yeah it is logical to convert them to BigInt. |
I am merging this PR, but we need to implement BigInt mapping to be consistent. |
You changed something in the tests, so now they are not working. dart test test/mysql_client.dart
|
Ah I see. You refactor and move it to separate files for TCP and Unix socket tests. Ok |
@zim32 yes, Maybe the file "test/mysql_client.dart" should be moved to "test/lib/mysql_client.dart" or something like this to make it more clear. And yes the BigInt change can be separate PR. thanks. |
I have tested this just for my simple use case.
@zim32 I can add some more tests for column types in this PR if general approach in this change is OK.
This change is not backward compatible (typedAssoc will return different types)
fixes #12