Method: Sequel::Model::Associations::AssociationReflection#slice_range
- Defined in:
- lib/sequel/model/associations.rb
#slice_range(limit_and_offset = limit_and_offset()) ⇒ Object
The range used for slicing when using the :ruby eager limit strategy.
581 582 583 584 585 586 |
# File 'lib/sequel/model/associations.rb', line 581 def slice_range(limit_and_offset = limit_and_offset()) limit, offset = limit_and_offset if limit || offset (offset||0)..(limit ? (offset||0)+limit-1 : -1) end end |