Sha256: 9676257964ed728cae6d2ba4185f7f3ef52a3cbde6e977ccb115bbaa37b4ebe9
Contents?: true
Size: 526 Bytes
Versions: 2
Compression:
Stored size: 526 Bytes
Contents
module Populator module Adapters module Abstract # Executes multiple SQL statements in one query when joined with ";" def execute_batch(sql, name = nil) raise NotImplementedError, "execute_batch is an abstract method" end def populate(table, columns, rows, name = nil) execute("INSERT INTO #{table} #{columns} VALUES #{rows.join(', ')}", name) end end end end class ActiveRecord::ConnectionAdapters::AbstractAdapter include Populator::Adapters::Abstract end
Version data entries
2 entries across 2 versions & 2 rubygems
Version | Path |
---|---|
ryanb-populator-0.1.0 | lib/populator/adapters/abstract.rb |
populator-0.2.1 | lib/populator/adapters/abstract.rb |