Module: Squeel::Nodes::Ordering

Included in:
Function, Grouping, Literal, Stub, Symbol
Defined in:
lib/squeel/nodes/ordering.rb

Instance Method Summary collapse

Instance Method Details

#ascOrder

Create an ascending Order node with this Node as its expression

Returns:

  • (Order)

    The new Order node


9
10
11
# File 'lib/squeel/nodes/ordering.rb', line 9

def asc
  Order.new self, 1
end

#descOrder

Create a descending Order node with this Node as its expression

Returns:

  • (Order)

    The new Order node


15
16
17
# File 'lib/squeel/nodes/ordering.rb', line 15

def desc
  Order.new self, -1
end