-
Notifications
You must be signed in to change notification settings - Fork 316
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 Rails 8.0 #2425
Open
andynu
wants to merge
13
commits into
rsim:master
Choose a base branch
from
andynu:rails-8-0-support
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Support Rails 8.0 #2425
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The initial connection creation method invocations were re-written to reduce convention by adding an explicit registration mapping between adapter name and class. This implements two. - adapter: oracle_enhanced This is the primary one that people will use. - adapter: oracle This replaces the previous emulate_oracle_adapter database config setting which we can no longer use, since the config is not available when we are registering this adapter name to class mapping, but accomplishes the same end. So if you have 'emulate_oracle_adapter: true` in your configs, remove that, and set your `adapter: oracle`. rails/rails@009c7e7
This makes the quote_column_name and quote_table_names methods organized more similarly to how they are the new mysql and postgres adapters.
Explain now returns an object. We need to coerce it into a string for rspec comparisons. https://blog.saeloun.com/2024/11/21/rails-7-2-adds-support-for-explain-method-to-activerecord-relation/ rails/rails@c1ea574
Introduce a new `bind_block` method. Mimicking this change in the postgres adapter: rails/rails@2b35775 Provides the expected :aN formatted bind parameter values needed by oci8. Thanks to dlaggero for this. rsim#2424 (comment)
These are not supported by Rails 7.2
First test failure involves a missing method `transform_query` Seems to have been removed in this rails commit: fd24e5bfc9540fc00764a59ddf39a993bbd63ba2 rails/rails@fd24e5b This method was replaced with `preprocess_query`.
@instrumenter is not defined. It was moved to a method. rails/rails@dc522a3
- Add `write_query?` implementation (mimicking postgres) to support the ability to prevent writes to a database - rails/rails@f39d72d - Replace the local implementation of execute, exec_query and its alias internal_exec_query with the new interface defined here rails/rails@fd24e5b#diff-e6fd03cad5e3437c76b6c5db106359124dc9feab8341ade39b9ae54af001fac9 of `raw_execute`, `cast_result`, and `affected_rows`. To support the affected_rows count this also had to add a `row_count` method to the coi and jdbc cursors. - without_prepared_statement? was removed rails/rails@2306c10
drop 3.1 add 3.4
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Building on top of #2424 this adds support for existing oracle_enhanced functionality to Rails 8.0. It may not fully support new Rails 8.0 features; For example there seems to be retry logic in rails now, and the oracle enhanced adapter is still doing its own thing.
Add
write_query?
implementation (mimicking postgres) to support the ability to prevent writes to a database - rails/rails@f39d72dReplace the local implementation of execute, exec_query and its alias internal_exec_query with the new interface defined here rails/rails@fd24e5b of
raw_execute
,cast_result
, andaffected_rows
. To support the affected_rows count this also had to add arow_count
method to the coi and jdbc cursors.without_prepared_statement? was removed rails/rails@2306c10
Fixes #2419