Class: ActiverecordCursorPagination::AscendingOrder
- Inherits:
-
OrderBase
- Object
- OrderBase
- ActiverecordCursorPagination::AscendingOrder
show all
- Defined in:
- lib/activerecord_cursor_pagination/ascending_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/ascending_order.rb', line 3
def direction
:asc
end
|
#reverse ⇒ Object
7
8
9
10
11
|
# File 'lib/activerecord_cursor_pagination/ascending_order.rb', line 7
def reverse
order = DescendingOrder.new table, name, index
order.base_id = base_id
order
end
|
#than_op ⇒ Object
13
14
15
|
# File 'lib/activerecord_cursor_pagination/ascending_order.rb', line 13
def than_op
'>'
end
|
#than_or_equal_op ⇒ Object
17
18
19
|
# File 'lib/activerecord_cursor_pagination/ascending_order.rb', line 17
def than_or_equal_op
'>='
end
|