Class: VORuby::ADQL::Having

Inherits:
Object show all
Defined in:
lib/voruby/adql/adql.rb,
lib/voruby/adql/transforms.rb

Overview

Represents the Having expression part of a query.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(condition) ⇒ Having



2015
2016
2017
# File 'lib/voruby/adql/adql.rb', line 2015

def initialize(condition)
  self.condition = condition
end

Instance Attribute Details

#conditionObject

Returns the value of attribute condition.



2013
2014
2015
# File 'lib/voruby/adql/adql.rb', line 2013

def condition
  @condition
end

Class Method Details

.from_xml(node) ⇒ Object



2028
2029
2030
2031
2032
# File 'lib/voruby/adql/adql.rb', line 2028

def self.from_xml(node)
  cond_node = REXML::XPath.first(node, 'Condition')
  cond = Condition.from_xml(cond_node)
  return Having.new(cond)
end

Instance Method Details

#to_adqlsObject



379
380
381
# File 'lib/voruby/adql/transforms.rb', line 379

def to_adqls
  "HAVING #{self.condition.to_adqls}"
end

#to_sObject



2024
2025
2026
# File 'lib/voruby/adql/adql.rb', line 2024

def to_s
  "{condition=#{self.condition}}"
end