vendor/plugins/ar-extensions-0.7.0a/lib/ar-extensions/import/mysql.rb
# Returns SQL the VALUES for an INSERT statement given the passed in +columns+ 
# and +array_of_attributes+.
Returns SQL the VALUES for an INSERT statement given the passed in +columns+
and +array_of_attributes+.
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 )   
    values = []
    array_of_attributes.each do |arr|
      my_values = []
      arr.each_with_index do |val,j|
        my_values << quote( val, columns[j] )
      end
      values << my_values
    end   
    values_arr = values.map{ |arr| '(' + arr.join( ',' ) + ')' }
  end
def values_sql_for_column_names_and_attributes ( columns , array_of_attributes ) values = [ ] array_of_attributes . each do | arr | my_values = [ ] arr . each_with_index do | val , j | my_values << quote ( val , columns [ j ] ) end values << my_values end values_arr = values . map { | arr | '(' + arr . join ( ',' ) + ')' } end
Returns SQL the VALUES for an INSERT statement given the passed in +columns+
and +array_of_attributes+.
Returns SQL the VALUES for an INSERT statement given the passed in + columns + and + array_of_attributes + .
# :nodoc:
columns
<not_specific>
array_of_attributes
<not_specific>