123456789_123456789_123456789_123456789_123456789_

Class: Arel::Nodes::Cte

Do not use. This class is for internal use only.

Class Method Summary

Instance Attribute Summary

Binary - Inherited

Node - Inherited

Instance Method Summary

Binary - Inherited

::Arel::Math - Included

#&, #*, #+, #-, #/, #<<, #>>, #^, #|, #~@

::Arel::OrderPredications - Included

::Arel::AliasPredication - Included

#as

::Arel::Predications - Included

::Arel::Expressions - Included

Node - Inherited

#and

Factory method to create an And node.

#fetch_attribute, #invert,
#not

Factory method to create a Nodes::Not node that has the recipient of the caller as a child.

#or

Factory method to create a Grouping node that has an Or node as a child.

#to_sql

FIXME: this method should go away.

::Arel::FactoryMethods - Included

Constructor Details

.new(name, relation, materialized: nil) ⇒ Cte

[ GitHub ]

  
# File 'activerecord/lib/arel/nodes/cte.rb', line 10

def initialize(name, relation, materialized: nil)
  super(name, relation)
  @materialized = materialized
end

Instance Attribute Details

#materialized (readonly)

[ GitHub ]

  
# File 'activerecord/lib/arel/nodes/cte.rb', line 8

attr_reader :materialized

Instance Method Details

#==(other)

Alias for #eql?.

[ GitHub ]

  
# File 'activerecord/lib/arel/nodes/cte.rb', line 25

alias :== :eql?

#eql?(other) ⇒ Boolean Also known as: #==

[ GitHub ]

  
# File 'activerecord/lib/arel/nodes/cte.rb', line 19

def eql?(other)
  self.class == other.class &&
    self.name == other.name &&
    self.relation == other.relation &&
    self.materialized == other.materialized
end

#hash

[ GitHub ]

  
# File 'activerecord/lib/arel/nodes/cte.rb', line 15

def hash
  [name, relation, materialized].hash
end

#name

[ GitHub ]

  
# File 'activerecord/lib/arel/nodes/cte.rb', line 6

alias :name :left

#relation

[ GitHub ]

  
# File 'activerecord/lib/arel/nodes/cte.rb', line 7

alias :relation :right

#to_cte

[ GitHub ]

  
# File 'activerecord/lib/arel/nodes/cte.rb', line 27

def to_cte
  self
end

#to_table

[ GitHub ]

  
# File 'activerecord/lib/arel/nodes/cte.rb', line 31

def to_table
  Arel::Table.new(name)
end