Method: MultiInsert::Query#initialize
- Defined in:
- lib/multi_insert/query.rb
#initialize(table, columns, values, opts = {}) ⇒ Query
Create an insert query against the specified table and columns, with the specified values. The following options are supported:
-
time (true) Whether to insert created_at and updated_at.
56 57 58 59 60 |
# File 'lib/multi_insert/query.rb', line 56 def initialize(table, columns, values, opts = {}) @table = table.to_sym @opts = opts @sql_insert = ::MultiInsert::QueryBuilder.insert(table, columns, values, opts) end |