Class: OracleSqlParser::Ast::OrderByClause

Inherits:
Hash show all
Defined in:
lib/oracle-sql-parser/ast/order_by_clause.rb

Instance Method Summary collapse

Methods inherited from Hash

[], #[]=, #initialize, #inspect, #map_ast!, #method_missing, #remove_nil_values!

Methods inherited from Base

#==, [], #ast, #deep_dup, deep_dup, find_different_value, #initialize, #initialize_copy, #inspect, #map_ast, #map_ast!, #remove_nil_values!

Methods included from Util::Parameterizable

#to_parameterized, #to_parameternized

Constructor Details

This class inherits a constructor from OracleSqlParser::Ast::Hash

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class OracleSqlParser::Ast::Hash

Instance Method Details

#to_sqlObject



3
4
5
6
7
8
9
10
# File 'lib/oracle-sql-parser/ast/order_by_clause.rb', line 3

def to_sql
  sql = []
  sql << "order"
  sql << @ast[:siblings].to_sql if @ast[:siblings]
  sql << "by"
  sql << @ast[:items].to_sql(:separator => ',')
  sql.join(" ")
end