Class: Arel::Nodes::SelectStatement
- Defined in:
- lib/arel/nodes/select_statement.rb
Instance Attribute Summary collapse
-
#cores ⇒ Object
readonly
Returns the value of attribute cores.
-
#limit ⇒ Object
Returns the value of attribute limit.
-
#lock ⇒ Object
Returns the value of attribute lock.
-
#offset ⇒ Object
Returns the value of attribute offset.
-
#orders ⇒ Object
Returns the value of attribute orders.
Instance Method Summary collapse
-
#initialize(cores = [SelectCore.new]) ⇒ SelectStatement
constructor
A new instance of SelectStatement.
- #initialize_copy(other) ⇒ Object
Methods inherited from Node
#and, #each, #not, #or, #to_sql
Constructor Details
#initialize(cores = [SelectCore.new]) ⇒ SelectStatement
Returns a new instance of SelectStatement.
7 8 9 10 11 12 13 |
# File 'lib/arel/nodes/select_statement.rb', line 7 def initialize cores = [SelectCore.new] @cores = cores @orders = [] @limit = nil @lock = nil @offset = nil end |
Instance Attribute Details
#cores ⇒ Object (readonly)
Returns the value of attribute cores.
4 5 6 |
# File 'lib/arel/nodes/select_statement.rb', line 4 def cores @cores end |
#limit ⇒ Object
Returns the value of attribute limit.
5 6 7 |
# File 'lib/arel/nodes/select_statement.rb', line 5 def limit @limit end |
#lock ⇒ Object
Returns the value of attribute lock.
5 6 7 |
# File 'lib/arel/nodes/select_statement.rb', line 5 def lock @lock end |
#offset ⇒ Object
Returns the value of attribute offset.
5 6 7 |
# File 'lib/arel/nodes/select_statement.rb', line 5 def offset @offset end |
#orders ⇒ Object
Returns the value of attribute orders.
5 6 7 |
# File 'lib/arel/nodes/select_statement.rb', line 5 def orders @orders end |
Instance Method Details
#initialize_copy(other) ⇒ Object
15 16 17 18 19 |
# File 'lib/arel/nodes/select_statement.rb', line 15 def initialize_copy other super @cores = @cores.map { |x| x.clone } @orders = @orders.map { |x| x.clone } end |