set_overrides.rb

lib/sequel/extensions/set_overrides.rb
Last Update: 2016-10-02 15:10:16 -0700

The set_overrides extension adds the Dataset#set_overrides and Dataset#set_defaults methods which provide a crude way to control the values used in INSERT/UPDATE statements if a hash of values is passed to Dataset#insert or Dataset#update. It is only recommended to use this for backwards compatibility.

You can load this extension into specific datasets:

ds = DB[:table]
ds = ds.extension(:set_overrides)

Or you can load it into all of a database's datasets, which is probably the desired behavior if you are using this extension:

DB.extension(:set_overrides)

Related module: Sequel::SetOverrides