apoc.cypher.runWrite

Details

Syntax

apoc.cypher.runWrite(statement, params) :: (value)

Description

Alias for apoc.cypher.doIt.

Input arguments

Name

Type

Description

statement

STRING

The Cypher statement to run.

params

MAP

The parameters for the given Cypher statement.

Return arguments

Name

Type

Description

value

MAP

The result returned from the Cypher statement.

Using dynamic labels in Cypher

Node labels and relationship types can be referenced dynamically in Cypher without using APOC.

Cypher syntax for creating, matching and merging labels and types dynamically
CREATE (n1:$(label))-[r:$(type)]->(n2:$(label))
MERGE (n1:$(label))-[r:$(type)]->(n2:$(label))
MATCH (n1:$(label))-[r:$(type)]->(n2:$(label))

The dynamically calculated type must evaluate to a STRING or LIST<STRING>. For more information, see the Cypher Manual → CREATE, MERGE, MATCH.