Class | Sequel::SQL::OrderedExpression |
In: |
lib/sequel/extensions/eval_inspect.rb
lib/sequel/sql.rb |
Parent: | Object |
INVERT_NULLS | = | {:first=>:last, :last=>:first}.freeze |
descending | [R] | Whether the expression should order the result set in a descending manner |
expression | [R] | The expression to order the result set by. |
nulls | [R] | Whether to sort NULLS FIRST/LAST |
Set the expression and descending attributes to the given values. Options:
:nulls : | Can be :first/:last for NULLS FIRST/LAST. |
# File lib/sequel/sql.rb, line 1368 1368: def initialize(expression, descending = true, opts=OPTS) 1369: @expression, @descending, @nulls = expression, descending, opts[:nulls] 1370: end
Return a copy that is ordered ASC
# File lib/sequel/sql.rb, line 1373 1373: def asc 1374: OrderedExpression.new(@expression, false, :nulls=>@nulls) 1375: end