rails--rails/activerecord/lib
John Hawthorn 22513cfba5 Change execute_batch to take array of statements
Adapters don't necessarily have the ability to execute a batch of
statements.

Previously execute_batch took a single string of statements separated by
';', this meant that the adapter had to have the ability to execute
batch statements.

Instead, this commit changes the method to take an array of statements.
Adapters which support batched queries can do the join there. For
adapters which don't we provide a fallback implementation: executing
each statement one at a time.

This also improves the implementation for the mysql2 adapter, which
understands that there is a maximium query length. Previously the caller
needed to split the statements before passing them to execute_batch, now
execute_batch itself is responsible for splitting the queries.
2019-11-17 20:16:06 -08:00
..
active_record Change execute_batch to take array of statements 2019-11-17 20:16:06 -08:00
arel Address `no implicit conversion of Arel::Attributes::Attribute into String` 2019-11-06 07:49:26 +00:00
rails/generators Enable `Layout/EmptyLinesAroundAccessModifier` cop 2019-06-13 12:00:45 +09:00
active_record.rb Stop autoloading AbstractAdapter prematurely 2019-09-13 01:10:14 +01:00
arel.rb Document Arel.sql 2019-09-26 19:37:42 -04:00