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:


43
44
45
46
47
# File 'lib/sequel/plugins/insert_conflict.rb', line 43

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