Method: DataMapper::Query#slice
- Defined in:
- lib/dm-core/query.rb
#slice(*args) ⇒ Object Also known as: []
Slices collection by adding limit and offset to the query, so a single query is executed
will execute query with the following limit and offset (when repository uses DataObjects adapter, and thus queries use SQL):
LIMIT 5 OFFSET 3
566 567 568 |
# File 'lib/dm-core/query.rb', line 566 def slice(*args) dup.slice!(*args) end |