-
Notifications
You must be signed in to change notification settings - Fork 29
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
Null values #53
Comments
If you need to handle nulls then you have to make fields nullable, in this case: import std.typecons;
struct V {
Nullable!int x;
int y;
} |
Thanks for the answer.
And if I remove the
I'm really newbie to D so it might looks dumb questions! |
The way |
This code was written in 2011 and AFAIR there was a problem with storing null in Variant/Algebraic. We need to upgrade this to newer D language version. I can't do it because I'm busy with other things, sorry. We need a volunteer for this. @jacob-carlborg yes we can remove it, but other code should be adjusted accordingly. |
I've already been using ddb with the latest DMD, at that point, perhaps one or two versions old now.
I've already done that faec7e4 😃. I don't think that ddb uses nullable directly. I left the nullable declared in ddb for backwards compatibility, but if it doesn't work anyway there's not much point in keeping it. |
Using the full name solves the compilation errors, thanks for replying ! |
I can't get it work. I need to handle situation if answer is null.
But this code is failing with error. "Result doesn't contain any rows" |
@bubnenkoff try |
Let's imagine that I have this struct
Let's imagine that my dataset returns something like
| 1 | 2 |
| null | 3 |
I will always have an error saying that it can't handle null values.
How can I fix this?
The text was updated successfully, but these errors were encountered: