lib/veritas/sql/generator/direction.rb in veritas-sql-generator-0.0.3 vs lib/veritas/sql/generator/direction.rb in veritas-sql-generator-0.0.4
- old
+ new
@@ -6,10 +6,12 @@
# Generates an SQL statement for a direction
module Direction
include Attribute
+ DESC = ' DESC'.freeze
+
# Visit an Ascending Direction
#
# @param [Relation::Operation::Order::Ascending] direction
#
# @return [#to_s]
@@ -25,10 +27,10 @@
#
# @return [#to_s]
#
# @api private
def visit_veritas_relation_operation_order_descending(direction)
- "#{dispatch direction.attribute} DESC"
+ dispatch(direction.attribute) << DESC
end
end # module Direction
end # module Generator
end # module SQL