-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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: Enable ef_compare for decimals #20035
Conversation
@bricelam, so I went ahead and had a first look at the code (specifically your mentioned PR on datetime and the one on What I wanted to ask before actually trying to work in an implementation
I'll try to have a more thorough look at the code infrastructure next week, yet, any help/pointers would be greatly appreciated - thanks! |
It looks like we already have some tests in test/EFCore.Sqlite.FunctionalTests/BuiltInDataTypesSqliteTest.cs. The comparison is done on the client, but if you enable a server translation, they'll verify that the result is still correct. |
src/EFCore.Sqlite.Core/Query/Internal/SqliteSqlTranslatingExpressionVisitor.cs
Outdated
Show resolved
Hide resolved
src/EFCore.Sqlite.Core/Query/Internal/SqliteSqlTranslatingExpressionVisitor.cs
Outdated
Show resolved
Hide resolved
Thanks for the tips, I actually now got the tests running and see some errors. Gonna submit an updated over the weekend. |
Code compiles but tests do not yet pass.
src/EFCore.Sqlite.Core/Query/Internal/SqliteSqlTranslatingExpressionVisitor.cs
Outdated
Show resolved
Hide resolved
src/EFCore.Sqlite.Core/Query/Internal/SqliteSqlTranslatingExpressionVisitor.cs
Outdated
Show resolved
Hide resolved
nullable: true, | ||
new[] { true, true }, | ||
typeof(int)); | ||
var oracle = SqlExpressionFactory.Constant(value: 0); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what is oracle!?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oracle: a person or thing regarded as an infallible authority or guide on something.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Kind of like a sentinel but non-arbitrary and with canonical semantics
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Exactly. The oracle predicts the expected result (which in this case is 0). But if desired, I'm happy to rename it to, e.g., expectedResult
or sth similar.
Hi @lokalmatador , Can I ask a question about what you are doing? I can't currently filter/order on a decimal in Sqlite database provider. Will your changes fix that? |
Hi @JonPSmith , |
Hi @lokalmatador, Thanks for the update, and for your help in moving EF Core forward. Great stuff. I was asking as I'm working on some docs, so now I know. |
Part of #19635