Class: VORuby::ADQL::JoinTable
- Defined in:
- lib/voruby/adql/adql.rb,
lib/voruby/adql/transforms.rb
Overview
Represents SQL JOIN expression.
Instance Attribute Summary collapse
-
#condition ⇒ Object
Returns the value of attribute condition.
-
#qualifier ⇒ Object
Returns the value of attribute qualifier.
-
#tables ⇒ Object
Returns the value of attribute tables.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(qualifier, tables, condition) ⇒ JoinTable
constructor
A new instance of JoinTable.
- #to_adqls ⇒ Object
- #to_s ⇒ Object
Constructor Details
#initialize(qualifier, tables, condition) ⇒ JoinTable
Returns a new instance of JoinTable.
2657 2658 2659 2660 2661 |
# File 'lib/voruby/adql/adql.rb', line 2657 def initialize(qualifier, tables, condition) self.qualifier = qualifier self.tables = tables self.condition = condition end |
Instance Attribute Details
#condition ⇒ Object
Returns the value of attribute condition.
2655 2656 2657 |
# File 'lib/voruby/adql/adql.rb', line 2655 def condition @condition end |
#qualifier ⇒ Object
Returns the value of attribute qualifier.
2655 2656 2657 |
# File 'lib/voruby/adql/adql.rb', line 2655 def qualifier @qualifier end |
#tables ⇒ Object
Returns the value of attribute tables.
2655 2656 2657 |
# File 'lib/voruby/adql/adql.rb', line 2655 def tables @tables end |
Class Method Details
.from_xml(node) ⇒ Object
2687 2688 2689 2690 2691 2692 2693 2694 2695 |
# File 'lib/voruby/adql/adql.rb', line 2687 def self.from_xml(node) qual_node = REXML::XPath.first(node, 'Qualifier') qual = Qualifier.from_xml(qual_node) tables_node = REXML::XPath.first(node, 'Tables') tables = Tables.from_xml(tables_node) cond_node = REXML::XPath.first(node, 'Condition') cond = Condition.from_xml(cond_node) return JoinTable.new(qual, tables, cond) end |
Instance Method Details
#to_adqls ⇒ Object
555 556 557 |
# File 'lib/voruby/adql/transforms.rb', line 555 def to_adqls "#{self.qualifier.to_adqls} #{self.tables.to_adqls} ON #{self.condition.to_adqls}" end |
#to_s ⇒ Object
2683 2684 2685 |
# File 'lib/voruby/adql/adql.rb', line 2683 def to_s "{qualifier=#{self.qualifier},tables=#{self.tables},condition=#{self.condition}}" end |