![]() 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. |
||
---|---|---|
.. | ||
active_record | ||
arel | ||
rails/generators | ||
active_record.rb | ||
arel.rb |