method

combine_multi_statements

rails latest stable - Class: ActiveRecord::ConnectionAdapters

Method deprecated or moved

This method is deprecated or moved on the latest stable version. The last existing version (v5.2.3) is shown here.

combine_multi_statements(total_sql)
private

No documentation available.

# File activerecord/lib/active_record/connection_adapters/abstract_mysql_adapter.rb, line 536
        def combine_multi_statements(total_sql)
          total_sql.each_with_object([]) do |sql, total_sql_chunks|
            previous_packet = total_sql_chunks.last
            sql << ";\n"
            if max_allowed_packet_reached?(sql, previous_packet) || total_sql_chunks.empty?
              total_sql_chunks << sql
            else
              previous_packet << sql
            end
          end
        end