-
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: Support translation of ToString #19473
Conversation
ralmsdeveloper
commented
Jan 3, 2020
- Resolve: Sqlite Support translation of ToString #17223
Enable tests
|
src/EFCore.Sqlite.Core/Query/Internal/SqliteObjectToStringTranslator.cs
Outdated
Show resolved
Hide resolved
Also, DateTime, DateTimeOffset, Decimal, Guid, and TimeSpan will be a different format than calling ToString on the client. |
(Well, Guid will be the same format, just upper-case) |
TimeStamp has no difference. For the others, the translation really is not compatible with client. |
@smitpatel & @bricelam |
dc559cf
to
d4e1e51
Compare
We discussed this as a team, and we decided that in EF Core, the semantics of ToString() can be very loose. It can return any reasonable string representation of the value. The format may be different from the string returned by .NET. This is already the case on SQL Server when the client and server are using different cultures. Given that, everything but |
Can skip. It can be done in separate PR at later stage. |
{ | ||
private static readonly HashSet<Type> _typeMapping = new HashSet<Type> | ||
{ | ||
typeof(int), |
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.
Can we add test for all these types in BuiltInDataTypesTestBase?
It can follow similar structure to QueryBuiltInDataTypesTest
,
A client side value converted to ToString compared to ToString on the column.
re-assigning this to @maumar |
@bricelam sorry for the delay, I had to solve some things here in the company. I've been doing some testing, so I removed support for:
For some reason when trying to convert the value ( |
de9acd3
to
26b9d3e
Compare
Add back Guid, float, and byte[]. float is expected to by lossy between .NET and SQLite |
@bricelam I'm sorry for the delay, I had a lot of things to solve here at the company, I'll add that until Saturday. |
No rush; we don't RTM until November 😉 |
9e7ef50
to
41bbdaf
Compare
41bbdaf
to
74379d6
Compare
This PR still needs work and is lower priority than other items we need to complete for 5.0, so unfortunately we are going to hold off on this for now. |
@ralmsdeveloper - Are you planning to complete this? Else I can take over and make needed changes to merge it to main. |
0d7fce5
to
acfb88d
Compare
Resolves dotnet#17223
acfb88d
to
1b3d637
Compare
@ralmsdeveloper - Thank you. |
@smitpatel sorry for the delay, I took a few days to help my father with his health! Thanks! |