Class: ArelExtensions::Nodes::Union

Inherits:
Arel::Nodes::Union
  • Object
show all
Defined in:
lib/arel_extensions/nodes/union.rb

Instance Method Summary collapse

Constructor Details

#initialize(left, right) ⇒ Union

Returns a new instance of Union.



5
6
7
# File 'lib/arel_extensions/nodes/union.rb', line 5

def initialize left,right
  return super(left,right)
end

Instance Method Details

#+(other) ⇒ Object



9
10
11
# File 'lib/arel_extensions/nodes/union.rb', line 9

def +(other)
  return ArelExtensions::Nodes::Union.new(self,other)
end

#as(other) ⇒ Object



17
18
19
# File 'lib/arel_extensions/nodes/union.rb', line 17

def as other
  Arel::Nodes::TableAlias.new Arel::Nodes::Grouping.new(self), Arel::Nodes::SqlLiteral.new(other.to_s)
end

#union(other) ⇒ Object



13
14
15
# File 'lib/arel_extensions/nodes/union.rb', line 13

def union(other)
  return ArelExtensions::Nodes::UnionAll.new(self,other)
end