Flowdock
method

combine_multi_statements

Importance_0
v6.1.7.7 - Show latest stable - 0 notes - Class: DatabaseStatements
combine_multi_statements(total_sql) 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/mysql/database_statements.rb, line 126
          def combine_multi_statements(total_sql)
            total_sql.each_with_object([]) do |sql, total_sql_chunks|
              previous_packet = total_sql_chunks.last
              if max_allowed_packet_reached?(sql, previous_packet)
                total_sql_chunks << +sql
              else
                previous_packet << ";\n"
                previous_packet << sql
              end
            end
          end
Register or log in to add new notes.