Skip to content

Add affected_rows to ActiveRecord::Result #1336

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

Merged
merged 1 commit into from
May 20, 2025

Conversation

aidanharan
Copy link
Contributor

Add affected_rows to ActiveRecord::Result. See rails/rails#55060

Also, removed logic from cast_result(result) as the results have already been converted to ActiveRecord::Result by perform_query.

Fixes https://github.com/rails-sqlserver/activerecord-sqlserver-adapter/actions/runs/15134938986/job/42544441561

  1) Failure:
ActiveRecord::AdapterTest#test_0003_#exec_query queries return an ActiveRecord::Result with affected rows [/usr/local/bundle/bundler/gems/rails-d1baada0da5a/activerecord/test/cases/adapter_test.rb:158]:
Expected: 2
  Actual: nil

@aidanharan aidanharan marked this pull request as ready for review May 20, 2025 13:48
@aidanharan aidanharan merged commit 9cf4eaa into main May 20, 2025
6 checks passed
@aidanharan aidanharan deleted the add-affected-rows-to-result branch May 20, 2025 13:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant