Class: Cyrel::AST::WithNode
- Inherits:
-
ClauseNode
- Object
- Node
- ClauseNode
- Cyrel::AST::WithNode
- Defined in:
- lib/cyrel/ast/with_node.rb
Instance Attribute Summary collapse
-
#distinct ⇒ Object
readonly
Returns the value of attribute distinct.
-
#items ⇒ Object
readonly
Returns the value of attribute items.
-
#where_conditions ⇒ Object
readonly
Returns the value of attribute where_conditions.
Instance Method Summary collapse
-
#initialize(items, distinct: false, where_conditions: nil) ⇒ WithNode
constructor
A new instance of WithNode.
Methods inherited from Node
Constructor Details
#initialize(items, distinct: false, where_conditions: nil) ⇒ WithNode
Returns a new instance of WithNode.
8 9 10 11 12 13 14 |
# File 'lib/cyrel/ast/with_node.rb', line 8 def initialize(items, distinct: false, where_conditions: nil) # items is an array of expressions/identifiers to project @items = items @distinct = distinct # where_conditions can be nil or an array of expressions @where_conditions = where_conditions end |
Instance Attribute Details
#distinct ⇒ Object (readonly)
Returns the value of attribute distinct.
6 7 8 |
# File 'lib/cyrel/ast/with_node.rb', line 6 def distinct @distinct end |
#items ⇒ Object (readonly)
Returns the value of attribute items.
6 7 8 |
# File 'lib/cyrel/ast/with_node.rb', line 6 def items @items end |
#where_conditions ⇒ Object (readonly)
Returns the value of attribute where_conditions.
6 7 8 |
# File 'lib/cyrel/ast/with_node.rb', line 6 def where_conditions @where_conditions end |