Class: Arel::Nodes::SelectCore
- Defined in:
- activerecord/lib/arel/nodes/select_core.rb
Instance Attribute Summary collapse
-
#comment ⇒ Object
Returns the value of attribute comment.
-
#groups ⇒ Object
Returns the value of attribute groups.
-
#havings ⇒ Object
Returns the value of attribute havings.
-
#optimizer_hints ⇒ Object
Returns the value of attribute optimizer_hints.
-
#projections ⇒ Object
Returns the value of attribute projections.
-
#set_quantifier ⇒ Object
Returns the value of attribute set_quantifier.
-
#source ⇒ Object
Returns the value of attribute source.
-
#wheres ⇒ Object
Returns the value of attribute wheres.
-
#windows ⇒ Object
Returns the value of attribute windows.
Instance Method Summary collapse
- #eql?(other) ⇒ Boolean (also: #==)
- #from ⇒ Object (also: #froms)
- #from=(value) ⇒ Object (also: #froms=)
- #hash ⇒ Object
-
#initialize(relation = nil) ⇒ SelectCore
constructor
A new instance of SelectCore.
- #initialize_copy(other) ⇒ Object
Methods inherited from Node
#and, #equality?, #fetch_attribute, #invert, #not, #or, #to_sql
Methods included from FactoryMethods
#coalesce, #create_and, #create_false, #create_join, #create_on, #create_string_join, #create_table_alias, #create_true, #grouping, #lower
Constructor Details
#initialize(relation = nil) ⇒ SelectCore
Returns a new instance of SelectCore.
9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
# 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 ⇒ Object
Returns the value of attribute comment
6 7 8 |
# File 'activerecord/lib/arel/nodes/select_core.rb', line 6 def comment @comment end |
#groups ⇒ Object
Returns the value of attribute groups
6 7 8 |
# File 'activerecord/lib/arel/nodes/select_core.rb', line 6 def groups @groups end |
#havings ⇒ Object
Returns the value of attribute havings
7 8 9 |
# File 'activerecord/lib/arel/nodes/select_core.rb', line 7 def havings @havings end |
#optimizer_hints ⇒ Object
Returns the value of attribute optimizer_hints
7 8 9 |
# File 'activerecord/lib/arel/nodes/select_core.rb', line 7 def optimizer_hints @optimizer_hints end |
#projections ⇒ Object
Returns the value of attribute projections
6 7 8 |
# File 'activerecord/lib/arel/nodes/select_core.rb', line 6 def projections @projections end |
#set_quantifier ⇒ Object
Returns the value of attribute set_quantifier
7 8 9 |
# File 'activerecord/lib/arel/nodes/select_core.rb', line 7 def set_quantifier @set_quantifier end |
#source ⇒ Object
Returns the value of attribute source
7 8 9 |
# File 'activerecord/lib/arel/nodes/select_core.rb', line 7 def source @source end |
#wheres ⇒ Object
Returns the value of attribute wheres
6 7 8 |
# File 'activerecord/lib/arel/nodes/select_core.rb', line 6 def wheres @wheres end |
#windows ⇒ Object
Returns the value of attribute windows
6 7 8 |
# File 'activerecord/lib/arel/nodes/select_core.rb', line 6 def windows @windows end |
Instance Method Details
#eql?(other) ⇒ Boolean Also known as: ==
52 53 54 55 56 57 58 59 60 61 62 63 |
# 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 |
#from ⇒ Object Also known as: froms
24 25 26 |
# File 'activerecord/lib/arel/nodes/select_core.rb', line 24 def from @source.left end |
#from=(value) ⇒ Object Also known as: froms=
28 29 30 |
# File 'activerecord/lib/arel/nodes/select_core.rb', line 28 def from=(value) @source.left = value end |
#hash ⇒ Object
45 46 47 48 49 50 |
# 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) ⇒ Object
35 36 37 38 39 40 41 42 43 |
# 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 |