Skip to content

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