Inline multiple_value_sets_insert_sql because it never changes, isn't particularly well-factored, and for parity with "not supports_import?"
This commit is contained in:
parent
2ada56f858
commit
7aefcf1164
|
@ -116,12 +116,6 @@ module ActiveRecord::Import::AbstractAdapter
|
|||
post_sql_statements
|
||||
end
|
||||
|
||||
|
||||
# Generates the INSERT statement used in insert multiple value sets.
|
||||
def multiple_value_sets_insert_sql(table_name, column_names, options) # :nodoc:
|
||||
"INSERT #{options[:ignore] ? 'IGNORE ':''}INTO #{table_name} (#{column_names.join(',')}) VALUES "
|
||||
end
|
||||
|
||||
# Returns SQL the VALUES for an INSERT statement given the passed in +columns+
|
||||
# and +array_of_attributes+.
|
||||
def values_sql_for_column_names_and_attributes( columns, array_of_attributes ) # :nodoc:
|
||||
|
|
|
@ -277,7 +277,7 @@ class ActiveRecord::Base
|
|||
end
|
||||
else
|
||||
# generate the sql
|
||||
insert_sql = connection.multiple_value_sets_insert_sql( quoted_table_name, escaped_column_names, options )
|
||||
insert_sql = "INSERT #{options[:ignore] ? 'IGNORE ':''}INTO #{quoted_table_name} (#{escaped_column_names.join(',')}) VALUES "
|
||||
values_sql = connection.values_sql_for_column_names_and_attributes( columns, array_of_attributes )
|
||||
post_sql_statements = connection.post_sql_statements( quoted_table_name, options )
|
||||
|
||||
|
|
Loading…
Reference in a new issue