Module: Sequel::Plugins::InsertConflict::InstanceMethods

Defined in:
lib/sequel/plugins/insert_conflict.rb

Instance Method Summary collapse

Instance Method Details

#insert_conflict(opts = OPTS) ⇒ Object

Set the insert_conflict options to pass to the dataset when inserting.

Raises:



47
48
49
50
51
# File 'lib/sequel/plugins/insert_conflict.rb', line 47

def insert_conflict(opts=OPTS)
  raise Error, "Model#insert_conflict is only supported on new model instances" unless new?
  @insert_conflict_opts = opts
  self
end