instance method
execute_batch
Ruby on Rails 7.2.3
Since v7.1.6 PrivateSignature
execute_batch(statements, name = nil)
No documentation comment.
Parameters
-
statementsreq -
nameopt = nil
Source
# File activerecord/lib/active_record/connection_adapters/mysql2/database_statements.rb, line 53
def execute_batch(statements, name = nil)
statements = statements.map { |sql| transform_query(sql) }
combine_multi_statements(statements).each do |statement|
with_raw_connection do |conn|
raw_execute(statement, name)
end
end
end
Defined in activerecord/lib/active_record/connection_adapters/mysql2/database_statements.rb line 53
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveRecord::ConnectionAdapters::Mysql2::DatabaseStatements