Method: Sequel::Model::InstanceMethods#this
- Defined in:
- lib/sequel/model/base.rb
#this ⇒ Object
Returns naked dataset that should return only the row related to this instance.
Artist[1].this
# SELECT * FROM artists WHERE (id = 1) LIMIT 1
1654 1655 1656 1657 1658 |
# File 'lib/sequel/model/base.rb', line 1654 def this return @this if @this raise Error, "No dataset for model #{model}" unless ds = model.instance_dataset @this = use_server(ds.where(pk_hash)) end |