Support Rails 8.0
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 - https://github.com/rails/rails/commit/f39d72d5267baed1000932831cda98503d1e1047 -
Replace the local implementation of execute, exec_query and its alias internal_exec_query with the new interface defined here https://github.com/rails/rails/commit/fd24e5bfc9540fc00764a59ddf39a993bbd63ba2 of
raw_execute,cast_result, andaffected_rows. To support the affected_rows count this also had to add arow_countmethod to the coi and jdbc cursors. -
without_prepared_statement? was removed https://github.com/rails/rails/commit/2306c10e7a9397f8096e49def97ed47125a4499f
Fixes #2419
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 https://github.com/rsim/oracle-enhanced/pull/2425#discussion_r1989663638 :
@@ -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 https://github.com/rsim/oracle-enhanced/pull/2425#pullrequestreview-2675271981, 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
instrumenter .instrument(
must be
@instrumenter .instrument(
That is how it used to be. But it appeared to have moved. Did it move back since?
From the commit: Use the instrumenter method.
@instrumenter is not defined. It was moved to a method.
https://github.com/rails/rails/commit/dc522a3e6933e014c691e06c5d866d6351d6640d
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 instrumenter method in 8.0.1.
@andynu @rsim -- Is there anything that I can help with to get this issue closed at Rails 8 supported? I don't want to redo any work that's been done, but getting this completed would be super helpful for a client.
I'm glad to do any development or testing that would be helpful!
🤷 I don't have keys to this kingdom either. I'd love for this project to continue, but I'm not sure how to accomplish that beyond the PRs.
@rsim Is there anything that I can do to assist? I'm glad to help in any way that I can.
@rsim One more comment. The latest Rails that this gem is compatible with is 7.1 which has reached end of active support and will reach the end of security support in four months.
https://endoflife.date/rails
I'm here to help in any way that I can.
@andynu @rsim -- Is there anything that I can help with to get this issue closed at Rails 8 supported? I don't want to redo any work that's been done, but getting this completed would be super helpful for a client.
I'm glad to do any development or testing that would be helpful!
@yahonda As the last person to release a new version of this gem, I assume you might be the right person to ask? Is there anything we can do to help get this released?
@yahonda Really appreciate the 7.1.1 release.
Anything I can help with to move this issue forward?
Would you rebase master branch?
fork synced.
git rebase -ff origin/master complete.
Could you address these RuboCop offenses and rebase onto the master branch? I'd like the RuboCop offense fixes to be included in the original commits, rather than seeing separate commits just for fixing RuboCop offenses.
https://github.com/rsim/oracle-enhanced/actions/runs/15732983575/job/44338346523?pr=2425
lib/active_record/connection_adapters/oracle_enhanced/context_index.rb:334:1: C: [Correctable] Layout/TrailingWhitespace: Trailing whitespace detected.
lib/active_record/connection_adapters/oracle_enhanced/context_index.rb:337:17: C: [Correctable] Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.
'CONTAINS',
^^^^^^^^^^
lib/active_record/connection_adapters/oracle_enhanced/context_index.rb:344:1: C: [Correctable] Layout/TrailingWhitespace: Trailing whitespace detected.
lib/active_record/connection_adapters/oracle_enhanced/context_index.rb:346:99: C: [Correctable] Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.
condition = Arel::Nodes::GreaterThan.new(contains_node, Arel::Nodes::SqlLiteral.new('0'))
^^^
lib/active_record/connection_adapters/oracle_enhanced/context_index.rb:347:1: C: [Correctable] Layout/TrailingWhitespace: Trailing whitespace detected.
lib/active_record/connection_adapters/oracle_enhanced/database_statements.rb:66:1: C: [Correctable] Layout/EmptyLines: Extra blank line detected.
Certainly. rubocop -a, and rebased.