method

execute_batch

Importance_0
v6.1.3.1 - Show latest stable - 0 notes - Class: DatabaseStatements
execute_batch(statements, name = nil) private

No documentation

This method has no description. You can help the Ruby on Rails community by adding new notes.

Hide source
# File activerecord/lib/active_record/connection_adapters/sqlite3/database_statements.rb, line 110
          def execute_batch(statements, name = nil)
            sql = combine_multi_statements(statements)

            if preventing_writes? && write_query?(sql)
              raise ActiveRecord::ReadOnlyError, "Write query attempted while in readonly mode: #{sql}"
            end

            materialize_transactions
            mark_transaction_written_if_write(sql)

            log(sql, name) do
              ActiveSupport::Dependencies.interlock.permit_concurrent_loads do
                @connection.execute_batch2(sql)
              end
            end
          end
Register or log in to add new notes.