-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
Use TypeHandler for all types #433
Comments
+1 |
I honestly don't know if I'm for or against this, I'll just note why we haven't dedicated much time to it: it's a potentially breaking change, so it'll have to wait for a 2.0 release. That being said, we're all for someone doing the digging on options as hours are the most limited resource around here - it'd be much appreciated. |
Another case this could help with is #213 as it would allow the user to replace the in-built handling for strings. |
Tagging for the v2 release. |
And that's bad. Already 2019, but the problem is not solved.
so that the change is no longer breaking |
Currently there is a separation between built-in types and custom types that use
ITypeHandler
.There seems to be a common theme of bugs/enhancements that all revolve around this separation.
I was thinking its worth investigating if the type handling could be unified, so that both the in-built types and custom type handlers use the same mechanism so that the code handling types can be simplified in to, look up type handler, check for an optimizer, otherwise just use the type handler.
This would need to introduce a new enhanced type handler that can optionally generate IL to convert the to/from the database value. This would then allow custom type handlers to also generate optimized IL to convert the value.
This shouldn't have any significant impact on query times as type handlers are only looked up once when generating the IL for the query.
The text was updated successfully, but these errors were encountered: