Class: Locomotive::RelationalAlgebra::AttributeColumnStructure

Inherits:
ColumnStructureEntry show all
Includes:
XML
Defined in:
lib/locomotive/relational_algebra/query_information.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from XML

included, #quote

Constructor Details

#initialize(attribute, cs) ⇒ AttributeColumnStructure

Returns a new instance of AttributeColumnStructure.



218
219
220
221
# File 'lib/locomotive/relational_algebra/query_information.rb', line 218

def initialize(attribute, cs)
  @attribute = attribute
  @column_structure = cs
end

Instance Attribute Details

#attributeObject (readonly)

Returns the value of attribute attribute.



215
216
217
# File 'lib/locomotive/relational_algebra/query_information.rb', line 215

def attribute
  @attribute
end

#column_structureObject (readonly)

Returns the value of attribute column_structure.



215
216
217
# File 'lib/locomotive/relational_algebra/query_information.rb', line 215

def column_structure
  @column_structure
end

Instance Method Details

#cloneObject



231
232
233
234
# File 'lib/locomotive/relational_algebra/query_information.rb', line 231

def clone
  AttributeColumnStructure.new(attribute.clone,
                               column_structure.clone)
end

#itemsObject



223
224
225
# File 'lib/locomotive/relational_algebra/query_information.rb', line 223

def items
  column_structure.items.flatten
end

#offsetsObject



227
228
229
# File 'lib/locomotive/relational_algebra/query_information.rb', line 227

def offsets
  column_structure.offsets.flatten
end

#to_xmlObject



236
237
238
239
240
# File 'lib/locomotive/relational_algebra/query_information.rb', line 236

def to_xml
  attribute_ :name => attribute.to_xml do
    column_structure.to_xml
  end
end