Sequel::SQL::Expression
Represents a column/expression to order the result set by.
Whether the expression should order the result set in a descending manner
The expression to order the result set by.
Set the expression and descending attributes to the given values.
# File lib/sequel/sql.rb, line 758 def initialize(expression, descending = true) @expression, @descending = expression, descending end
Return a copy that is ASC
# File lib/sequel/sql.rb, line 763 def asc OrderedExpression.new(@expression, false) end
Return a copy that is DESC
# File lib/sequel/sql.rb, line 768 def desc OrderedExpression.new(@expression) end
Return an inverted expression, changing ASC to DESC and vice versa
# File lib/sequel/sql.rb, line 773 def invert OrderedExpression.new(@expression, !@descending) end
[Validate]
Generated with the Darkfish Rdoc Generator 2.