Module: Arel::TreeManager::StatementMethods
- Included in:
- DeleteManager, UpdateManager
- Defined in:
- lib/arel/tree_manager.rb
Instance Method Summary collapse
- #key ⇒ Object
- #key=(key) ⇒ Object
- #offset(offset) ⇒ Object
- #order(*expr) ⇒ Object
- #take(limit) ⇒ Object
- #where(expr) ⇒ Object
- #wheres=(exprs) ⇒ Object
Instance Method Details
permalink #key ⇒ Object
[View source]
27 28 29 |
# File 'lib/arel/tree_manager.rb', line 27 def key @ast.key end |
permalink #key=(key) ⇒ Object
[View source]
23 24 25 |
# File 'lib/arel/tree_manager.rb', line 23 def key=(key) @ast.key = Nodes.build_quoted(key) end |
permalink #offset(offset) ⇒ Object
[View source]
13 14 15 16 |
# File 'lib/arel/tree_manager.rb', line 13 def offset(offset) @ast.offset = Nodes::Offset.new(Nodes.build_quoted(offset)) if offset self end |
permalink #order(*expr) ⇒ Object
[View source]
18 19 20 21 |
# File 'lib/arel/tree_manager.rb', line 18 def order(*expr) @ast.orders = expr self end |
permalink #take(limit) ⇒ Object
[View source]
8 9 10 11 |
# File 'lib/arel/tree_manager.rb', line 8 def take(limit) @ast.limit = Nodes::Limit.new(Nodes.build_quoted(limit)) if limit self end |
permalink #where(expr) ⇒ Object
[View source]
35 36 37 38 |
# File 'lib/arel/tree_manager.rb', line 35 def where(expr) @ast.wheres << expr self end |
permalink #wheres=(exprs) ⇒ Object
[View source]
31 32 33 |
# File 'lib/arel/tree_manager.rb', line 31 def wheres=(exprs) @ast.wheres = exprs end |