Skip to content
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

WIP Rails 7 2 support #2424

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open

WIP Rails 7 2 support #2424

wants to merge 6 commits into from

Conversation

andynu
Copy link
Contributor

@andynu andynu commented Jan 31, 2025

This makes significant progress towards supporting Rails 7.2

Not sure this should happen. But the on_load hook version is not
happening early enough for the Rakefile's clear task.
This makes the quote_column_name and quote_table_names methods organized
more similarly to how they are the new mysql and postgres adapters.
Active record wants '?' as a bind placeholder. Without this it will not
provide bind variables to exec.

Oracle requires :N style bind parameters, so it a translation is
required.

Something went wrong in the translation between rails 7.1 and rails 7.2
so that the where("CONTAINS(table.col, ?, 0) >0", term) was no longer
getting it's bind parameter translated to ':a1' like it should be.

This change drops down to AREL nodes which ensures that the contains
query is getting passed through the visitor pattern, specifically
hitting the visit_Arel_Nodes_BindParam method to convert the param to
':a1'.

I still do not understand what changed in rails, but this workaround is
effective.
This was referenced Jan 31, 2025
@andynu
Copy link
Contributor Author

andynu commented Jan 31, 2025

  • Emulate OracleAdapter isn't working because the loading process changed significantly. oracle_enhanced_connection is never called.
  • The fix here for Model.contains context index searching is a work around for that specific case, but I'm worried that there is a more general conversion from activerecord bind variables '?' to compatible oracle bind variables :N that is not well handled.
  • The timezone tests do not reliably run for me, perhaps oracle client version related.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant