Class: Arel::Nodes::SelectStatement
- Inherits:
-
Node
- Object
- Node
- Arel::Nodes::SelectStatement
- Defined in:
- lib/arel/nodes/select_statement.rb
Instance Attribute Summary (collapse)
-
- (Object) cores
readonly
Returns the value of attribute cores.
-
- (Object) limit
Returns the value of attribute limit.
-
- (Object) lock
Returns the value of attribute lock.
-
- (Object) offset
Returns the value of attribute offset.
-
- (Object) orders
Returns the value of attribute orders.
-
- (Object) with
Returns the value of attribute with.
Instance Method Summary (collapse)
-
- (SelectStatement) initialize(cores = [SelectCore.new])
constructor
A new instance of SelectStatement.
- - (Object) initialize_copy(other)
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
- (SelectStatement) initialize(cores = [SelectCore.new])
A new instance of SelectStatement
7 8 9 10 11 12 13 14 15 |
# File 'lib/arel/nodes/select_statement.rb', line 7 def initialize cores = [SelectCore.new] #puts caller @cores = cores @orders = [] @limit = nil @lock = nil @offset = nil @with = nil end |
Instance Attribute Details
- (Object) cores (readonly)
Returns the value of attribute cores
4 5 6 |
# File 'lib/arel/nodes/select_statement.rb', line 4 def cores @cores end |
- (Object) limit
Returns the value of attribute limit
5 6 7 |
# File 'lib/arel/nodes/select_statement.rb', line 5 def limit @limit end |
- (Object) lock
Returns the value of attribute lock
5 6 7 |
# File 'lib/arel/nodes/select_statement.rb', line 5 def lock @lock end |
- (Object) offset
Returns the value of attribute offset
5 6 7 |
# File 'lib/arel/nodes/select_statement.rb', line 5 def offset @offset end |
- (Object) orders
Returns the value of attribute orders
5 6 7 |
# File 'lib/arel/nodes/select_statement.rb', line 5 def orders @orders end |
- (Object) with
Returns the value of attribute with
5 6 7 |
# File 'lib/arel/nodes/select_statement.rb', line 5 def with @with end |
Instance Method Details
- (Object) initialize_copy(other)
17 18 19 20 21 |
# File 'lib/arel/nodes/select_statement.rb', line 17 def initialize_copy other super @cores = @cores.map { |x| x.clone } @orders = @orders.map { |x| x.clone } end |