Class: Cyrel::AST::MergeNode
- Inherits:
-
ClauseNode
- Object
- Node
- ClauseNode
- Cyrel::AST::MergeNode
- Defined in:
- lib/cyrel/ast/merge_node.rb
Overview
AST node for MERGE clauses For when you want to find or create, the Schrödinger’s cat of graph operations
Instance Attribute Summary collapse
-
#on_create ⇒ Object
readonly
Returns the value of attribute on_create.
-
#on_match ⇒ Object
readonly
Returns the value of attribute on_match.
-
#pattern ⇒ Object
readonly
Returns the value of attribute pattern.
Instance Method Summary collapse
-
#initialize(pattern, on_create: nil, on_match: nil) ⇒ MergeNode
constructor
A new instance of MergeNode.
Methods inherited from Node
Constructor Details
#initialize(pattern, on_create: nil, on_match: nil) ⇒ MergeNode
Returns a new instance of MergeNode.
10 11 12 13 14 |
# File 'lib/cyrel/ast/merge_node.rb', line 10 def initialize(pattern, on_create: nil, on_match: nil) @pattern = pattern @on_create = on_create @on_match = on_match end |
Instance Attribute Details
#on_create ⇒ Object (readonly)
Returns the value of attribute on_create.
8 9 10 |
# File 'lib/cyrel/ast/merge_node.rb', line 8 def on_create @on_create end |
#on_match ⇒ Object (readonly)
Returns the value of attribute on_match.
8 9 10 |
# File 'lib/cyrel/ast/merge_node.rb', line 8 def on_match @on_match end |
#pattern ⇒ Object (readonly)
Returns the value of attribute pattern.
8 9 10 |
# File 'lib/cyrel/ast/merge_node.rb', line 8 def pattern @pattern end |