Class: Cyrel::AST::MergeNode

Inherits:
ClauseNode show all
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

Instance Method Summary collapse

Methods inherited from Node

#==, #accept

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_createObject (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_matchObject (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

#patternObject (readonly)

Returns the value of attribute pattern.



8
9
10
# File 'lib/cyrel/ast/merge_node.rb', line 8

def pattern
  @pattern
end