Method: Cequel::Record::RecordSet#reverse

Defined in:
lib/cequel/record/record_set.rb

#reverseRecordSet

Note:

This method can only be called on record sets whose partition key columns are fully specified. See #[] for a discussion of partition key scoping.

Reverse the order in which records will be returned from the record set

Since:

  • 1.0.0



448
449
450
451
452
453
454
455
# File 'lib/cequel/record/record_set.rb', line 448

def reverse
  unless partition_specified?
    fail IllegalQuery,
         "Can't reverse without scoping to partition key " \
         "#{range_key_name}"
  end
  scoped(reversed: !reversed?)
end