sequel_3_dataset_methods.rb

lib/sequel/extensions/sequel_3_dataset_methods.rb
Last Update: 2017-07-13 15:05:08 -0700

This adds the following dataset methods:

[]=

filter with the first argument, update with the second

insert_multiple

insert multiple rows at once

set

alias for update

to_csv

return string in csv format for the dataset

db=

change the dataset's database

opts=

change the dataset's opts

It is only recommended to use this for backwards compatibility.

You can load this extension into specific datasets:

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

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(:sequel_3_dataset_methods)

Related module: Sequel::Sequel3DatasetMethods