Path: | lib/sequel/extensions/set_overrides.rb |
Last Update: | Thu Nov 12 08:45:04 +0000 2015 |
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)