123456789_123456789_123456789_123456789_123456789_

Class: Arel::Nodes::SelectStatement

Do not use. This class is for internal use only.
Relationships & Source Files
Super Chains via Extension / Inclusion / Inheritance
Class Chain:
Instance Chain:
Inherits: Arel::Nodes::NodeExpression
Defined in: activerecord/lib/arel/nodes/select_statement.rb

Class Method Summary

Instance Attribute Summary

Node - Inherited

Instance Method Summary

Constructor Details

.new(relation = nil) ⇒ SelectStatement

[ GitHub ]

  
# File 'activerecord/lib/arel/nodes/select_statement.rb', line 9

def initialize(relation = nil)
  super()
  @cores          = [SelectCore.new(relation)]
  @orders         = []
  @limit          = nil
  @lock           = nil
  @offset         = nil
  @with           = nil
end

Instance Attribute Details

#cores (readonly)

[ GitHub ]

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

attr_reader :cores

#limit (rw)

[ GitHub ]

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

attr_accessor :limit, :orders, :lock, :offset, :with

#lock (rw)

[ GitHub ]

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

attr_accessor :limit, :orders, :lock, :offset, :with

#offset (rw)

[ GitHub ]

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

attr_accessor :limit, :orders, :lock, :offset, :with

#orders (rw)

[ GitHub ]

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

attr_accessor :limit, :orders, :lock, :offset, :with

#with (rw)

[ GitHub ]

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

attr_accessor :limit, :orders, :lock, :offset, :with

Instance Method Details

#==(other)

Alias for #eql?.

[ GitHub ]

  
# File 'activerecord/lib/arel/nodes/select_statement.rb', line 38

alias :== :eql?

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

[ GitHub ]

  
# File 'activerecord/lib/arel/nodes/select_statement.rb', line 29

def eql?(other)
  self.class == other.class &&
    self.cores == other.cores &&
    self.orders == other.orders &&
    self.limit == other.limit &&
    self.lock == other.lock &&
    self.offset == other.offset &&
    self.with == other.with
end

#hash

[ GitHub ]

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

def hash
  [@cores, @orders, @limit, @lock, @offset, @with].hash
end

#initialize_copy(other)

[ GitHub ]

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

def initialize_copy(other)
  super
  @cores  = @cores.map { |x| x.clone }
  @orders = @orders.map { |x| x.clone }
end