Failure:
ActiveRecord::BindParameterTest#test_bind_params_to_sql_with_prepared_statements_coerced [/activerecord-sqlserver-adapter/test/cases/coerced_tests.rb:298]:
Query pattern(s) "EXEC sp_executesql N'SELECT [authors].* FROM [authors] WHERE ([authors].[id] IN (@0, @1, @2) OR [authors].[id] IS NULL)', N'@0 bigint, @1 bigint, @2 bigint', @0 = 1, @1 = 2, @2 = 3" not found.
Queries:
EXEC sp_executesql N'SELECT [authors].* FROM [authors] WHERE ([authors].[id] IN (@0, @1, @2) OR [authors].[id] IS NULL)', N'@0 int, @1 int, @2 int', @0 = 1, @1 = 2, @2 = 3
bin/rails test /activerecord-sqlserver-adapter/test/cases/coerced_tests.rb:297
The method has also been updated for serialized columns so that the SerializedAttributeTest#test_where_by_serialized_attribute_with_hash_in_array test passes.
The
visit_Arel_Nodes_HomogeneousIn
method was incorrectly removed in https://github.com/rails-sqlserver/activerecord-sqlserver-adapter/pull/1068. This PR adds the method back in while also fixing the method for Rails 7.1This fixes the following failing test that started in Rails 7.1.2 (https://github.com/rails-sqlserver/activerecord-sqlserver-adapter/actions/runs/6849256715/job/18621067933?pr=1136):
The method has also been updated for serialized columns so that the
SerializedAttributeTest#test_where_by_serialized_attribute_with_hash_in_array
test passes.