-
Notifications
You must be signed in to change notification settings - Fork 6
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
mysql wrapper doesn't support row with NULL column. #10
Comments
Duplicate of nim-lang/Nim#1359 and nim-lang/Nim#1477 |
This is IMO still an issue and since nim-lang/Nim#1477 has been closed I will reopen this. We need to figure out a way to support NULL columns in the db* modules. |
@Araq Maybe we should change the API to use Option[T]? |
No, let's add overloads that accept Json. It can be more efficient this way for integers etc. Option[T] would be Option[string] which is just as weird. |
Couldn't we come up with some sort of simple type-safe API using a macro? Abusing JSON for this seems odd. |
Hmm, ok. So it would be |
Marking as high priority so that we do this soon. |
This doesn't require breaking changes so I'm demoting it. |
Any suggested temporary work around to this? This has got me quite stuck at the moment |
Araq, I ended up setting the last bit in every byte to 1 and putting those lost bits in an extra byte every 8 bytes. Insanely disgusting but avoids null bytes and I had to come up with something fast |
I have this problem constructing complex inserts with db_postgres. I would say the solution is to use Option[T] as it is the most straightforward and the concept of options map to null/not null quite well. |
The text was updated successfully, but these errors were encountered: