Class: Locomotive::RelationalAlgebra::Set

Inherits:
Binary show all
Defined in:
lib/locomotive/relational_algebra/operators/set/basic_set.rb

Direct Known Subclasses

Difference, Union

Instance Attribute Summary

Attributes inherited from Operator

#schema

Attributes included from AstHelpers::AstNode

#kind, #left_child, #owner, #right_child, #value

Instance Method Summary collapse

Methods inherited from Binary

#initialize

Methods inherited from Operator

#bound, #free, #initialize, #to_xml, #xml_content, #xml_kind, #xml_schema

Methods included from XML

included, #quote, #to_xml

Methods included from AstHelpers::Annotations

#method_missing, #respond_to?

Methods included from AstHelpers::AstNode

#has_left_child?, #has_right_child?, #initialize, #is_leaf?, #traverse, #traverse_strategy=

Constructor Details

This class inherits a constructor from Locomotive::RelationalAlgebra::Binary

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Locomotive::AstHelpers::Annotations

Instance Method Details

#cloneObject



11
12
13
# File 'lib/locomotive/relational_algebra/operators/set/basic_set.rb', line 11

def clone
  self.class.new(left.clone, right.clone)
end

#left_and_right(op1, op2) ⇒ Object



6
7
8
9
# File 'lib/locomotive/relational_algebra/operators/set/basic_set.rb', line 6

def left_and_right(op1,op2)
  self.schema = op1.schema.clone
  super(op1,op2)
end

#set(var, plan) ⇒ Object



15
16
17
18
19
# File 'lib/locomotive/relational_algebra/operators/set/basic_set.rb', line 15

def set(var,plan)
  self.class.new(
    left.set(var,plan),
    right.set(var,plan))
end