Class: OracleSqlParser::Ast::TableReference
- Defined in:
- lib/oracle-sql-parser/ast/table_reference.rb
Instance Method Summary collapse
Methods inherited from Hash
[], #[]=, #initialize, #map_ast!, #method_missing, #remove_nil_values!
Methods inherited from Base
#==, [], #ast, #deep_dup, deep_dup, find_different_value, #initialize, #initialize_copy, #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
#inspect ⇒ Object
4 5 6 |
# File 'lib/oracle-sql-parser/ast/table_reference.rb', line 4 def inspect "#<#{self.class.name} #{@ast.inspect}>" end |
#to_sql(options = {}) ⇒ Object
8 9 10 11 12 13 14 15 16 |
# File 'lib/oracle-sql-parser/ast/table_reference.rb', line 8 def to_sql( = {}) result = '' result += "#{@ast[:schema_name].to_sql}." if @ast[:schema_name] result += @ast[:table_name].to_sql if @ast[:table_name] result += "@#{@ast[:dblink].to_sql}" if @ast[:dblink] result += @ast[:subquery].to_sql if @ast[:subquery] result += " #{@ast[:table_alias].to_sql}" if @ast[:table_alias] result end |