class Cassie::Statements::Execution::PartitionLinking::CursoringPolicy

Public Instance Methods

adjust_limit() click to toggle source
Calls superclass method
# File lib/cassie/statements/execution/partition_linking/cursoring_policy.rb, line 11
def adjust_limit
  return super unless peeking_execution.since_cursor
  # leave the limit to return all results
  # from latest partition
end
combine_rows(rows_a, rows_b) click to toggle source
Calls superclass method
# File lib/cassie/statements/execution/partition_linking/cursoring_policy.rb, line 6
def combine_rows(rows_a, rows_b)
  return super unless peeking_execution.since_cursor
  rows_b
end
previous_key(current_key) click to toggle source
Calls superclass method
# File lib/cassie/statements/execution/partition_linking/cursoring_policy.rb, line 26
def previous_key(current_key)
  return super unless peeking_execution.since_cursor

  # linking while cursoring with since
  # should return results from latest partition
  last_key
end
seek_partition?() click to toggle source
Calls superclass method
# File lib/cassie/statements/execution/partition_linking/cursoring_policy.rb, line 17
def seek_partition?
  return super unless peeking_execution.since_cursor
  raise "linking partitions only supported for descending orderings. Open an issue if you need this!" if ascending?

  # linking while cursoring with since
  # should return latest results
  current_key != last_key
end