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
sqlite module returns empty instead of nill #1479
Comments
This is the documented behaviour. Or at least it is well known. It's also the right behaviour because it's only ambiguous when it's a string and if your data model distinguishes between "" and NULL, it's broken. People who care about not losing information should use the dbj_ modules. |
Sorry, I disagree. Even though it is documented, it is not the expected behavior and leads to information loss, the avoidance of which is highly critical. |
A string of length zero and a NUL are not identical semantically. (e.g. doing data analysis in R, there is a clear distinction between NA and an empty string; one could mean a user choose to enter a blank option, while the other means the information was not available in the dataset.) |
I think the db module should distinguish between "" and NULL. The |
Any news after 2 years? |
We fixed the db modules since forever. |
So the |
@Araq: What do you mean? I don't see the wanted behavior anywhere. |
null
is returned as""
, not asnil
as expected. A query with no results returns a row of""
s, not[]
as expected.related to #1364, I wouldn't be surprised if there were more places with this behavior.
The text was updated successfully, but these errors were encountered: