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

Nullable Properties give some issues #23

Open
StevenThuriot opened this issue Oct 4, 2018 · 0 comments
Open

Nullable Properties give some issues #23

StevenThuriot opened this issue Oct 4, 2018 · 0 comments

Comments

@StevenThuriot
Copy link
Contributor

StevenThuriot commented Oct 4, 2018

Hi!

I've run into an issue when querying some data that has nullable fields and/or DateTimes.
I'm not sure if I'm doing something wrong, or are they just not supported at this time?

Just using a simple query like this:

Select Name, NullableDate
 from ClassesWithNullable
 where COALESCE(NullableDate, #0001-01-01#) >= #2018-01-01#

I've made a small unit test in a fork that reproduces the issue at hand, and made some changes that makes everything work. It'd be cool if you could take a look and throw your thoughts about it my way.

You can find the changes here StevenThuriot/nquery-vnext@1a53a02

As a final thought, it would be really useful to be able to add BinaryOperatorSignatures of our own. Currently the BinaryOperator class is readonly and internal and we can only add such methods by adding implicit or explicit operator methods . While this is completely fine in most cases, the types aren't always our own and we can't add them this way. e.g. Nullables; Since they're sealed, I tried to replicate their behavior but of course this completely messes up the flow of NQuery ( IsNullableOfT and GetNullableType ) . Even after changing all those methods and keeping NQuery happy, of course the expression trees wouldn't have it when throwing around null and this new type, so it was just a major headache and I started on making the changes in the commit above instead.

Of course, I'm more than willing to make the changes and write some unit tests for them and send in a pull request; But I'd like your thoughts on the matter first before putting in the work.

Thanks!
Steven

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

No branches or pull requests

1 participant