Class: Arel::Nodes::SelectCore
Do not use. This class is for internal use only.
Relationships & Source Files | |
Super Chains via Extension / Inclusion / Inheritance | |
Class Chain:
self,
Node
|
|
Instance Chain:
self,
Node ,
::Arel::FactoryMethods
|
|
Inherits: |
Arel::Nodes::Node
|
Defined in: | activerecord/lib/arel/nodes/select_core.rb |
Class Method Summary
- .new(relation = nil) ⇒ SelectCore constructor
Instance Attribute Summary
- #comment rw
- #from (also: #froms) rw
- #from=(value) (also: #froms=) rw
-
#froms
rw
Alias for #from.
- #groups rw
- #havings rw
- #optimizer_hints rw
- #projections rw
- #set_quantifier rw
- #source rw
- #wheres rw
- #windows rw
Node
- Inherited
Instance Method Summary
-
#==(other)
Alias for #eql?.
- #eql?(other) ⇒ Boolean (also: #==)
- #hash
- #initialize_copy(other)
Node
- Inherited
#and | Factory method to create an And node. |
#fetch_attribute, #invert, | |
#not | Factory method to create a |
#or | |
#to_sql | FIXME: this method should go away. |
::Arel::FactoryMethods
- Included
#cast, #coalesce, #create_and, #create_false, #create_join, #create_on, #create_string_join, #create_table_alias, #create_true, #grouping, | |
#lower | Create a LOWER() function. |
Constructor Details
.new(relation = nil) ⇒ SelectCore
# File 'activerecord/lib/arel/nodes/select_core.rb', line 9
def initialize(relation = nil) super() @source = JoinSource.new(relation) # https://ronsavage.github.io/SQL/sql-92.bnf.html#set%20quantifier @set_quantifier = nil @optimizer_hints = nil @projections = [] @wheres = [] @groups = [] @havings = [] @windows = [] @comment = nil end
Instance Attribute Details
#comment (rw)
[ GitHub ]# File 'activerecord/lib/arel/nodes/select_core.rb', line 6
attr_accessor :projections, :wheres, :groups, :windows, :comment
#from (rw) Also known as: #froms
[ GitHub ]# File 'activerecord/lib/arel/nodes/select_core.rb', line 24
def from @source.left end
#from=(value) (rw) Also known as: #froms=
[ GitHub ]# File 'activerecord/lib/arel/nodes/select_core.rb', line 28
def from=(value) @source.left = value end
#froms (rw)
Alias for #from.
# File 'activerecord/lib/arel/nodes/select_core.rb', line 33
alias :froms :from
#groups (rw)
[ GitHub ]# File 'activerecord/lib/arel/nodes/select_core.rb', line 6
attr_accessor :projections, :wheres, :groups, :windows, :comment
#havings (rw)
[ GitHub ]# File 'activerecord/lib/arel/nodes/select_core.rb', line 7
attr_accessor :havings, :source, :set_quantifier, :optimizer_hints
#optimizer_hints (rw)
[ GitHub ]# File 'activerecord/lib/arel/nodes/select_core.rb', line 7
attr_accessor :havings, :source, :set_quantifier, :optimizer_hints
#projections (rw)
[ GitHub ]#set_quantifier (rw)
[ GitHub ]# File 'activerecord/lib/arel/nodes/select_core.rb', line 7
attr_accessor :havings, :source, :set_quantifier, :optimizer_hints
#source (rw)
[ GitHub ]# File 'activerecord/lib/arel/nodes/select_core.rb', line 7
attr_accessor :havings, :source, :set_quantifier, :optimizer_hints
#wheres (rw)
[ GitHub ]# File 'activerecord/lib/arel/nodes/select_core.rb', line 6
attr_accessor :projections, :wheres, :groups, :windows, :comment
#windows (rw)
[ GitHub ]# File 'activerecord/lib/arel/nodes/select_core.rb', line 6
attr_accessor :projections, :wheres, :groups, :windows, :comment
Instance Method Details
#==(other)
Alias for #eql?.
# File 'activerecord/lib/arel/nodes/select_core.rb', line 64
alias :== :eql?
#eql?(other) ⇒ Boolean
Also known as: #==
# File 'activerecord/lib/arel/nodes/select_core.rb', line 52
def eql?(other) self.class == other.class && self.source == other.source && self.set_quantifier == other.set_quantifier && self.optimizer_hints == other.optimizer_hints && self.projections == other.projections && self.wheres == other.wheres && self.groups == other.groups && self.havings == other.havings && self.windows == other.windows && self.comment == other.comment end
#hash
[ GitHub ]# File 'activerecord/lib/arel/nodes/select_core.rb', line 45
def hash [ @source, @set_quantifier, @projections, @optimizer_hints, @wheres, @groups, @havings, @windows, @comment ].hash end
#initialize_copy(other)
[ GitHub ]# File 'activerecord/lib/arel/nodes/select_core.rb', line 35
def initialize_copy(other) super @source = @source.clone if @source @projections = @projections.clone @wheres = @wheres.clone @groups = @groups.clone @havings = @havings.clone @windows = @windows.clone end