apoc.text.toCypher

Function APOC Core

apoc.text.toCypher(value, {skipKeys,keepKeys,skipValues,keepValues,skipNull,node,relationship,start,end}) | tries it’s best to convert the value to a cypher-property-string

Signature

apoc.text.toCypher(value :: ANY?, config = {} :: MAP?) :: (STRING?)

Input parameters

Name Type Default

value

ANY?

null

config

MAP?

{}

Usage Examples

RETURN apoc.text.toCypher("Neo4j") AS output;
Table 1. Results
output

"'Neo4j'"

RETURN apoc.text.toCypher({key: "Value"}) AS output;
Table 2. Results
output

"{key:'Value'}"

CREATE (p:Person) RETURN apoc.text.toCypher(p) AS output;
Table 3. Results
output

"(:Person {})"