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

Returns a new instance of Having.



1969
1970
1971
# File 'lib/voruby/adql/adql.rb', line 1969

def initialize(condition)
	self.condition = condition
end

Instance Attribute Details

#conditionObject

Returns the value of attribute condition.



1967
1968
1969
# File 'lib/voruby/adql/adql.rb', line 1967

def condition
  @condition
end

Class Method Details

.from_xml(node) ⇒ Object



1982
1983
1984
1985
1986
# File 'lib/voruby/adql/adql.rb', line 1982

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



1978
1979
1980
# File 'lib/voruby/adql/adql.rb', line 1978

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