Method: Cequel::Record::RecordSet#in
- Defined in:
- lib/cequel/record/record_set.rb
#in(range) ⇒ RecordSet
Restrict records to those whose value in the first unscoped primary key column are in the given range. Will accept both inclusive ranges (1..5) and end-exclusive ranges (1...5). If you need a range with an exclusive start value, use #after, which can be combined with #before or #from to create a range.
396 397 398 399 400 401 |
# File 'lib/cequel/record/record_set.rb', line 396 def in(range) scoped( lower_bound: bound(true, true, range.first), upper_bound: bound(false, !range.exclude_end?, range.last) ) end |