Class: Sequel::SQL::OrderedExpression

Class | Sequel::SQL::OrderedExpression
In: | lib/sequel_core/sql.rb
Parent: | SpecificExpression

Represents a column/expression to order the result set by.

### Methods

new to_s

### Attributes

descending | [R] | Whether the expression should order the result set in a descending manner
expression | [R] | The expression to order the result set by.

### Public Class methods

new(expression, descending = true)

Set the expression and descending attributes to the given values.

[Source]

         # File lib/sequel_core/sql.rb, line 727
    727:       def initialize(expression, descending = true)
    728:         @expression, @descending = expression, descending
    729:       end

### Public Instance methods

to_s(ds)

Delegate the creation of the resulting SQL to the given dataset, since it may be database dependent.

[Source]

         # File lib/sequel_core/sql.rb, line 733
    733:       def to_s(ds)
    734:         ds.ordered_expression_sql(self)
    735:       end

[Validate]