Class: Locomotive::RelationalAlgebra::Distinct

Inherits:
Unary show all
Defined in:
lib/locomotive/relational_algebra/operators/set/distinct.rb

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 Operator

#bound, #free, #to_xml, #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?, #is_leaf?, #traverse, #traverse_strategy=

Constructor Details

#initialize(op) ⇒ Distinct

Returns a new instance of Distinct.



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

def initialize(op)
  super(op)
end

Dynamic Method Handling

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

Instance Method Details

#child=(op) ⇒ Object



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

def child=(op)
  self.schema = op.schema.clone
  super(op)
end

#cloneObject



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

def clone
  Distinct.new(
    child.clone)
end

#set(var, plan) ⇒ Object



21
22
23
24
# File 'lib/locomotive/relational_algebra/operators/set/distinct.rb', line 21

def set(var,plan)
  Distinct.new(
    child.set(var,plan))
end

#xml_contentObject



26
27
28
29
# File 'lib/locomotive/relational_algebra/operators/set/distinct.rb', line 26

def xml_content
  content do
  end
end