-
Notifications
You must be signed in to change notification settings - Fork 309
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
Define adapter type maps statically when possible #2199
Define adapter type maps statically when possible #2199
Conversation
rails/rails@c5bf2b4 support is necessary. |
bce16be
to
dc51934
Compare
Now CI is green. Let me squash commits and make this pull request 'Ready for review.' |
a18905d
to
0b3099b
Compare
0b3099b
to
a19175a
Compare
a19175a
to
05090c8
Compare
@koic Would you review this pull request? The main differences from the previous commits are: |
I meant to say the main differences are adding |
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.
Looks good to me. Thanks for tackling this!
Thanks for the review. It gets merged. |
This appears to fix issue rsim#2256. I believe it should have the same memory implications as the intention in rsim#2199. The type maps are loaded once when they are first called. Only one instance of the mapping is ever created. Fortunately this was enough to solve the problem, but if there were a need, this could easily be worked into the clear_cache! API to reset it at a later point in the application just by setting the @type_map to nil.
This pull request supports
Define adapter type maps statically when possible
rails/rails#42773 in Active Record Oracle enhanced adapter.Also, to make CI green this pull request needs these additional commits.
_quote
toquote
_type_cast
totype_cast