Class: ActiverecordCursorPagination::DescendingOrder
- Inherits:
-
OrderBase
- Object
- OrderBase
- ActiverecordCursorPagination::DescendingOrder
show all
- Defined in:
- lib/activerecord_cursor_pagination/descending_order.rb
Instance Attribute Summary
Attributes inherited from OrderBase
#base_id, #index, #name, #table
Instance Method Summary
collapse
Methods inherited from OrderBase
#base_id?, #equals_sql, #full_name, #initialize, order_factory, #order_sql, parse, parse_order_node, parse_string, #quote_full_name, #quote_name, #quote_table, #statement_key, #table?, #table_exists?, #than_or_equal_sql, #than_sql, #valid_name?, #valid_table_name?
Instance Method Details
#direction ⇒ Object
3
4
5
|
# File 'lib/activerecord_cursor_pagination/descending_order.rb', line 3
def direction
:desc
end
|
#reverse ⇒ Object
7
8
9
10
11
|
# File 'lib/activerecord_cursor_pagination/descending_order.rb', line 7
def reverse
order = AscendingOrder.new table, name, index
order.base_id = base_id
order
end
|
#than_op ⇒ Object
13
14
15
|
# File 'lib/activerecord_cursor_pagination/descending_order.rb', line 13
def than_op
'<'
end
|
#than_or_equal_op ⇒ Object
17
18
19
|
# File 'lib/activerecord_cursor_pagination/descending_order.rb', line 17
def than_or_equal_op
'<='
end
|