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.
2709 2710 2711 2712 2713 |
# File 'lib/voruby/adql/adql.rb', line 2709 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.
2707 2708 2709 |
# File 'lib/voruby/adql/adql.rb', line 2707 def condition @condition end |
#qualifier ⇒ Object
Returns the value of attribute qualifier.
2707 2708 2709 |
# File 'lib/voruby/adql/adql.rb', line 2707 def qualifier @qualifier end |
#tables ⇒ Object
Returns the value of attribute tables.
2707 2708 2709 |
# File 'lib/voruby/adql/adql.rb', line 2707 def tables @tables end |
Class Method Details
.from_xml(node) ⇒ Object
2739 2740 2741 2742 2743 2744 2745 2746 2747 |
# File 'lib/voruby/adql/adql.rb', line 2739 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
2735 2736 2737 |
# File 'lib/voruby/adql/adql.rb', line 2735 def to_s "{qualifier=#{self.qualifier},tables=#{self.tables},condition=#{self.condition}}" end |