Module: Veritas::SQL::Generator::Direction

Includes:
Attribute
Included in:
Relation::Unary
Defined in:
lib/veritas/sql/generator/direction.rb

Overview

Generates an SQL statement for a direction

Constant Summary collapse

DESC =
' DESC'.freeze

Constants included from Identifier

Identifier::ESCAPED_QUOTE, Identifier::QUOTE

Instance Method Summary collapse

Methods included from Attribute

#visit_veritas_attribute

Methods included from Identifier

#visit_identifier

Instance Method Details

#visit_veritas_relation_operation_order_ascending(direction) ⇒ #to_s

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Visit an Ascending Direction

Parameters:

  • direction (Relation::Operation::Order::Ascending)

Returns:

  • (#to_s)


20
21
22
# File 'lib/veritas/sql/generator/direction.rb', line 20

def visit_veritas_relation_operation_order_ascending(direction)
  dispatch direction.attribute
end

#visit_veritas_relation_operation_order_descending(direction) ⇒ #to_s

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Visit an Descending Direction

Parameters:

  • direction (Relation::Operation::Order::Descending)

Returns:

  • (#to_s)


31
32
33
# File 'lib/veritas/sql/generator/direction.rb', line 31

def visit_veritas_relation_operation_order_descending(direction)
  dispatch(direction.attribute) << DESC
end