lib/halog/datastore.rb
# generate the SQL statement for insertion into a table
generate the SQL statement for insertion into a table
generate the SQL statement for insertion into a table
def insert_sql_for(table)
        fields = %w[ import_id ] + send("#{table}_fields")
        params = fields.collect { |f| ":#{f}" }.join(',')
                "INSERT INTO #{table}(#{fields.join(',')}) VALUES (#{params})"
      end
def insert_sql_for ( table ) fields = %w[ import_id ] + send ( "#{table}_fields" ) params = fields . collect { | f | ":#{f}" } . join ( ',' ) "INSERT INTO #{table}(#{fields.join(',')}) VALUES (#{params})" end
generate the SQL statement for insertion into a table
generate the SQL statement for insertion into a table
table