Class: Locomotive::RelationalAlgebra::Attach
- Inherits:
-
Unary
- Object
- RelAlgAstNode
- Operator
- Unary
- Locomotive::RelationalAlgebra::Attach
- Defined in:
- lib/locomotive/relational_algebra/operators/projections/attach.rb
Instance Attribute Summary collapse
-
#item ⇒ Object
Returns the value of attribute item.
Attributes inherited from Operator
Attributes included from AstHelpers::AstNode
#kind, #left_child, #owner, #right_child, #value
Instance Method Summary collapse
- #child=(op) ⇒ Object
- #clone ⇒ Object
-
#initialize(op, item) ⇒ Attach
constructor
A new instance of Attach.
- #set(var, plan) ⇒ Object
- #xml_content ⇒ Object
Methods inherited from Operator
#bound, #free, #to_xml, #xml_kind, #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(op, item) ⇒ Attach
Returns a new instance of Attach.
37 38 39 40 |
# File 'lib/locomotive/relational_algebra/operators/projections/attach.rb', line 37 def initialize(op, item) self.item = item super(op) end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Locomotive::AstHelpers::Annotations
Instance Attribute Details
#item ⇒ Object
Returns the value of attribute item.
34 35 36 |
# File 'lib/locomotive/relational_algebra/operators/projections/attach.rb', line 34 def item @item end |
Instance Method Details
#child=(op) ⇒ Object
42 43 44 45 46 |
# File 'lib/locomotive/relational_algebra/operators/projections/attach.rb', line 42 def child=(op) self.schema = op.schema + Schema.new({ item.attribute => [item.atom.type] }) super(op) end |
#clone ⇒ Object
54 55 56 |
# File 'lib/locomotive/relational_algebra/operators/projections/attach.rb', line 54 def clone Attach.new(child.clone, item.clone) end |
#set(var, plan) ⇒ Object
58 59 60 61 62 |
# File 'lib/locomotive/relational_algebra/operators/projections/attach.rb', line 58 def set(var, plan) Attach.new( child.set(var,plan), item.clone) end |
#xml_content ⇒ Object
48 49 50 51 52 |
# File 'lib/locomotive/relational_algebra/operators/projections/attach.rb', line 48 def xml_content content do item.to_xml end end |