Class: Arel::Nodes::SelectCore
- Defined in:
- lib/arel/nodes/select_core.rb
Instance Attribute Summary collapse
-
#groups ⇒ Object
Returns the value of attribute groups.
-
#having ⇒ Object
Returns the value of attribute having.
-
#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.
-
#top ⇒ Object
Returns the value of attribute top.
-
#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 ⇒ SelectCore
constructor
A new instance of SelectCore.
- #initialize_copy(other) ⇒ Object
Methods inherited from Node
#_caller, #and, #each, #not, #or, #to_sql
Methods included from FactoryMethods
#create_and, #create_false, #create_join, #create_on, #create_string_join, #create_table_alias, #create_true, #grouping, #lower
Constructor Details
#initialize ⇒ SelectCore
Returns a new instance of SelectCore.
7 8 9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/arel/nodes/select_core.rb', line 7 def initialize super() @source = JoinSource.new nil @top = nil # http://savage.net.au/SQL/sql-92.bnf.html#set%20quantifier @set_quantifier = nil @projections = [] @wheres = [] @groups = [] @having = nil @windows = [] end |
Instance Attribute Details
#groups ⇒ Object
Returns the value of attribute groups.
4 5 6 |
# File 'lib/arel/nodes/select_core.rb', line 4 def groups @groups end |
#having ⇒ Object
Returns the value of attribute having.
5 6 7 |
# File 'lib/arel/nodes/select_core.rb', line 5 def having @having end |
#projections ⇒ Object
Returns the value of attribute projections.
4 5 6 |
# File 'lib/arel/nodes/select_core.rb', line 4 def projections @projections end |
#set_quantifier ⇒ Object
Returns the value of attribute set_quantifier.
5 6 7 |
# File 'lib/arel/nodes/select_core.rb', line 5 def set_quantifier @set_quantifier end |
#source ⇒ Object
Returns the value of attribute source.
5 6 7 |
# File 'lib/arel/nodes/select_core.rb', line 5 def source @source end |
#top ⇒ Object
Returns the value of attribute top.
4 5 6 |
# File 'lib/arel/nodes/select_core.rb', line 4 def top @top end |
#wheres ⇒ Object
Returns the value of attribute wheres.
4 5 6 |
# File 'lib/arel/nodes/select_core.rb', line 4 def wheres @wheres end |
#windows ⇒ Object
Returns the value of attribute windows.
4 5 6 |
# File 'lib/arel/nodes/select_core.rb', line 4 def windows @windows end |
Instance Method Details
#eql?(other) ⇒ Boolean Also known as: ==
49 50 51 52 53 54 55 56 57 58 59 |
# File 'lib/arel/nodes/select_core.rb', line 49 def eql? other self.class == other.class && self.source == other.source && self.top == other.top && self.set_quantifier == other.set_quantifier && self.projections == other.projections && self.wheres == other.wheres && self.groups == other.groups && self.having == other.having && self.windows == other.windows end |
#from ⇒ Object Also known as: froms
21 22 23 |
# File 'lib/arel/nodes/select_core.rb', line 21 def from @source.left end |
#from=(value) ⇒ Object Also known as: froms=
25 26 27 |
# File 'lib/arel/nodes/select_core.rb', line 25 def from= value @source.left = value end |
#hash ⇒ Object
42 43 44 45 46 47 |
# File 'lib/arel/nodes/select_core.rb', line 42 def hash [ @source, @top, @set_quantifier, @projections, @wheres, @groups, @having, @windows ].hash end |
#initialize_copy(other) ⇒ Object
32 33 34 35 36 37 38 39 40 |
# File 'lib/arel/nodes/select_core.rb', line 32 def initialize_copy other super @source = @source.clone if @source @projections = @projections.clone @wheres = @wheres.clone @groups = @groups.clone @having = @having.clone if @having @windows = @windows.clone end |