-
Notifications
You must be signed in to change notification settings - Fork 317
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
base: master
Are you sure you want to change the base?
Support Rails 8.0 #2425
Conversation
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
Yes! Thank you.
…On Tue, Mar 11, 2025 at 12:15 PM DanielClarke750 ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In activerecord-oracle_enhanced-adapter.gemspec
<#2425 (comment)>
:
> @@ -26,7 +26,7 @@ This adapter is superset of original ActiveRecord Oracle adapter.
"rubygems_mfa_required" => "true"
}
- s.add_runtime_dependency("activerecord", ["~> 7.1.0"])
+ s.add_runtime_dependency("activerecord", ["~> 7.2.0"])
Should this be bumped up to 8.0?
—
Reply to this email directly, view it on GitHub
<#2425 (review)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAONGMKCRALSMVBQT6OQF32T4DZVAVCNFSM6AAAAABXW7IN5GVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMZDMNZVGI3TCOJYGE>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
The VERSION should change too, but I'm not sure at what point in the PR process that is most appropriate. |
File dbms_output.rb, line 35
must be
|
That is how it used to be. From the commit: @instrumenter is not defined. It was moved to a method. |
This patch was only mentioned in the 8.0.2 changelog I've tested this branch in 8.0.2 and found no issues. The only issue was the absence of the |
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