Class: VORuby::ADQL::Into

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

Overview

Represents the SQL INTO expression.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name) ⇒ Into

Returns a new instance of Into.



2212
2213
2214
# File 'lib/voruby/adql/adql.rb', line 2212

def initialize(name)
  self.table_name = name
end

Instance Attribute Details

#table_nameObject

Returns the value of attribute table_name.



2210
2211
2212
# File 'lib/voruby/adql/adql.rb', line 2210

def table_name
  @table_name
end

Class Method Details

.from_xml(node) ⇒ Object



2220
2221
2222
2223
2224
# File 'lib/voruby/adql/adql.rb', line 2220

def self.from_xml(node)
  table_name_node = REXML::XPath.first(node, 'TableName')
  table_name = TableName.from_xml(table_name_node)
  return Into.new(table_name)
end

Instance Method Details

#to_adqlsObject



442
443
444
# File 'lib/voruby/adql/transforms.rb', line 442

def to_adqls
  "INTO #{self.table_name}"
end

#to_sObject



2216
2217
2218
# File 'lib/voruby/adql/adql.rb', line 2216

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