Class: Locomotive::RelationalAlgebra::LiteralTable
- Inherits:
-
Leaf
- Object
- RelAlgAstNode
- Operator
- Leaf
- Locomotive::RelationalAlgebra::LiteralTable
- Defined in:
- lib/locomotive/relational_algebra/operators/tables/literal_table.rb
Instance Attribute Summary collapse
- #lit_list ⇒ Object writeonly
Attributes inherited from Operator
Attributes included from AstHelpers::AstNode
#kind, #left_child, #owner, #right_child, #value
Instance Method Summary collapse
- #clone ⇒ Object
-
#initialize(llist) ⇒ LiteralTable
constructor
A new instance of LiteralTable.
- #xml_content ⇒ Object
- #xml_kind ⇒ Object
Methods inherited from Leaf
Methods inherited from Operator
#bound, #free, #to_xml, #xml_schema
Methods included from XML
Methods included from AstHelpers::Annotations
Methods included from AstHelpers::AstNode
#has_left_child?, #has_right_child?, #is_leaf?, #traverse, #traverse_strategy=
Constructor Details
#initialize(llist) ⇒ LiteralTable
Returns a new instance of LiteralTable.
70 71 72 |
# File 'lib/locomotive/relational_algebra/operators/tables/literal_table.rb', line 70 def initialize(llist) self.lit_list = to_literal_list llist end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Locomotive::AstHelpers::Annotations
Instance Attribute Details
#lit_list=(llist) ⇒ Object
47 48 49 50 51 52 53 |
# File 'lib/locomotive/relational_algebra/operators/tables/literal_table.rb', line 47 def lit_list=(llist) s = Hash[ *llist.collect do |attr, types| [attr,types.collect { |a| a.type }.uniq] end.flatten_once ] self.schema = Schema.new(s) @lit_list = llist end |
Instance Method Details
#clone ⇒ Object
84 85 86 |
# File 'lib/locomotive/relational_algebra/operators/tables/literal_table.rb', line 84 def clone LiteralTable.new( lit_list.clone ) end |
#xml_content ⇒ Object
78 79 80 81 82 |
# File 'lib/locomotive/relational_algebra/operators/tables/literal_table.rb', line 78 def xml_content content do lit_list.to_xml end end |
#xml_kind ⇒ Object
74 75 76 |
# File 'lib/locomotive/relational_algebra/operators/tables/literal_table.rb', line 74 def xml_kind :table end |