-
Notifications
You must be signed in to change notification settings - Fork 457
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
Support for NodaTime #3624
base: master
Are you sure you want to change the base?
Support for NodaTime #3624
Conversation
/azp run test-all |
Azure Pipelines successfully started running 1 pipeline(s). |
Test baselines changed by this PR. Don't forget to merge/close baselines PR after this pr merged/closed. |
i suggest a optional assembly parameter. |
/azp run test-all |
Azure Pipelines successfully started running 1 pipeline(s). |
There is an overload with Type parameter. I think it is enough. |
/azp run test-all |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run test-all |
Azure Pipelines successfully started running 1 pipeline(s). |
update to address v5 changes? |
# Conflicts: # Source/LinqToDB/SqlProvider/BasicSqlOptimizer.cs # Tests/Linq/UserTests/Issue2560Tests.cs
Azure Pipelines successfully started running 1 pipeline(s). |
Supporting NodaTime without adding a dependency results in quite ugly code. The blocker here is the ability to easily define mappings for methods that you can't attribute from outside linq2db core. |
Test baselines changed by this PR. Don't forget to merge/close baselines PR after this pr merged/closed. |
/azp run test-all |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run test-all |
Azure Pipelines successfully started running 1 pipeline(s). |
@igor-tkachev , @sdanyliv regarding @jods4 comment - do you remember what drived you to create this feature? |
/azp run test-all |
Azure Pipelines successfully started running 1 pipeline(s). |
Test baselines changed by this PR. Don't forget to merge/close baselines PR after this pr merged/closed. |
That's not in core library but in |
@MaceWindu missed that! |
We do not need to add any dependencies to linq2db project. If you do not like it, we can move it to linq2db.Tools, add dependency and move it to Examples, or delete it at all. |
If we add mapping for all properties of a nodadatetime object like Hour, Minute, ... as we do for DateTime and DateTimeOffset i think it is usefull to have such a extension (maybe in a Linq2Db.NodaDateTime assembly). But for this we need a extension like in #4401 |
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.
I'm good with being in linq2db.Tools
, though I think a dedicated linq2db.NodaTime
would be better, because it could have a direct dependency on NodaTime
, which would simplify the mapping code from having to build custom expressions.
Also, it looks like the current code only maps the LocalDateTime
type. A proper nodatime handler should map OffsetDateTime
as well, as well as possibly LocalDate
and LocalTime
.
@viceroypenguin, direct dependency is one of forms of dll hell, something we struggled with unsuccessfully in bltoolkit (previous version of linq2db). |
Yes, I agree, at least in the main library. However, a) doing it in a dedicated library for that support is usually less concerning, and b) dependency management is significantly better today than it was 10 years ago. |
Remaining tasks:
|
No description provided.