Parameters in Cypher
7.1 · Lesson

Parameters in Cypher

As you test your Full definition for Cypher (opens in a new tab)Neo4j's implementation of GQL, the ISO standard query language for graph databases. It is declarative: you describe the pattern to find, and the database decides how to find it. statements, you will use a variety literal values to ensure that your Cypher queries are correct. But you don't want to change the Cypher statement every time you test. In fact, any change to a Cypher statement requires a recompilation of the Cypher code which is expensive. You create Cypher statements that will not change, except for the substitution of placeholders (parameters) in the query. A best practice is to parameterize values in your Cypher statements.

In your Cypher statements, a parameter name begins with the $ symbol.