Class: Arel::Nodes::SelectCore

Inherits:
Node
  • Object
show all
Defined in:
lib/arel/nodes/select_core.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Node

#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

#initializeSelectCore

Returns a new instance of SelectCore.



7
8
9
10
11
12
13
14
15
16
17
# File 'lib/arel/nodes/select_core.rb', line 7

def initialize
  @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
end

Instance Attribute Details

#groupsObject

Returns the value of attribute groups.



4
5
6
# File 'lib/arel/nodes/select_core.rb', line 4

def groups
  @groups
end

#havingObject

Returns the value of attribute having.



5
6
7
# File 'lib/arel/nodes/select_core.rb', line 5

def having
  @having
end

#projectionsObject

Returns the value of attribute projections.



4
5
6
# File 'lib/arel/nodes/select_core.rb', line 4

def projections
  @projections
end

#set_quantifierObject

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

#sourceObject

Returns the value of attribute source.



5
6
7
# File 'lib/arel/nodes/select_core.rb', line 5

def source
  @source
end

#topObject

Returns the value of attribute top.



4
5
6
# File 'lib/arel/nodes/select_core.rb', line 4

def top
  @top
end

#wheresObject

Returns the value of attribute wheres.



4
5
6
# File 'lib/arel/nodes/select_core.rb', line 4

def wheres
  @wheres
end

Instance Method Details

#fromObject Also known as: froms



19
20
21
# File 'lib/arel/nodes/select_core.rb', line 19

def from
  @source.left
end

#from=(value) ⇒ Object Also known as: froms=



23
24
25
# File 'lib/arel/nodes/select_core.rb', line 23

def from= value
  @source.left = value
end

#initialize_copy(other) ⇒ Object



30
31
32
33
34
35
36
37
# File 'lib/arel/nodes/select_core.rb', line 30

def initialize_copy other
  super
  @source      = @source.clone if @source
  @projections = @projections.clone
  @wheres      = @wheres.clone
  @groups      = @groups.clone
  @having      = @having.clone if @having
end