Upgrade: Introduce Parameter Object: QueryIntent#1380
Draft
aidanharan wants to merge 9 commits intomainfrom
Draft
Upgrade: Introduce Parameter Object: QueryIntent#1380aidanharan wants to merge 9 commits intomainfrom
aidanharan wants to merge 9 commits intomainfrom
Conversation
There was a problem hiding this comment.
Pull request overview
This PR upgrades the ActiveRecord SQL Server adapter to be compatible with Rails main branch after the introduction of the QueryIntent parameter object pattern (Rails PR #55897). The changes refactor the adapter to use the new QueryIntent API instead of passing individual sql, binds, and name parameters.
Changes:
- Refactored database statement methods to use QueryIntent parameter object pattern
- Updated test assertions to match new Rails error message formats
- Fixed query cache to use accessor method instead of instance variable
- Enhanced timestamp logic to respect user-provided values in upsert operations
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| lib/active_record/connection_adapters/sqlserver/database_statements.rb | Updated perform_query signature to accept QueryIntent; replaced exec_delete/exec_update with delete/update methods using QueryIntent; enhanced timestamp logic for upsert operations |
| lib/active_record/connection_adapters/sqlserver/showplan.rb | Updated set_showplan_option to create and pass QueryIntent to raw_execute |
| lib/active_record/connection_adapters/sqlserver/schema_statements.rb | Updated indexes method to use QueryIntent when calling select |
| test/support/query_assertions.rb | Updated assertion error messages to match Rails' new format with conditional query listing |
| test/support/core_ext/query_cache.rb | Changed @query_cache instance variable access to query_cache method call |
| test/cases/coerced_tests.rb | Updated test expectations for new "matching queries" error message format |
| Gemfile | Updated minitest to ~> 6.0 and added minitest-mock dependency |
| compose.ci.yaml | Changed from RAILS_BRANCH to RAILS_COMMIT=65dc2163e3 for CI environment |
| Dockerfile.ci | Changed from RAILS_BRANCH to RAILS_COMMIT=65dc2163e3 for Docker build |
| AGENTS.md | Added comprehensive documentation for AI coding agents working with the repository |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or 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
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.
Upgrade the adapter so that it passes against Rails
mainbranch till after rails/rails#55897 was merged.