Module: Populator::Adapters::Oracle

Included in:
ActiveRecord::ConnectionAdapters::OracleAdapter
Defined in:
lib/populator/adapters/oracle.rb

Instance Method Summary collapse

Instance Method Details

#populate(table, columns, rows, name = nil) ⇒ Object

Executes SQL statements one at a time.



7
8
9
10
11
12
13
14
# File 'lib/populator/adapters/oracle.rb', line 7

def populate(table, columns, rows, name = nil)
  rows.each do |row|
    sql = "INSERT INTO #{table} #{columns} VALUES #{row}"
    log(sql, name) do
      @connection.exec(sql)
    end
  end
end