class ParamsReady::Pagination::CursorBuilder::Selector

Attributes

column[R]
key[R]

Public Class Methods

new(key, column) click to toggle source
# File lib/params_ready/pagination/cursor.rb, line 35
def initialize(key, column)
  @key = key
  @column = column
  freeze
end

Public Instance Methods

expression(arel_table, context) click to toggle source
# File lib/params_ready/pagination/cursor.rb, line 41
def expression(arel_table, context)
  column.attribute(key, arel_table, context)
end
rvalue(cte) click to toggle source
# File lib/params_ready/pagination/cursor.rb, line 45
def rvalue(cte)
  cte.project(key)
end