Use FalkorDB parameterized queries
Pass user-supplied values as parameters so FalkorDB can cache and reuse the query plan.
Usage
Prefix the query with CYPHER and name=value declarations, then reference each value with $name
inside the query body.
Example
CYPHER name='Alice'
MATCH (u:User {name: $name})
RETURN u.id
Notes
- Parameters let FalkorDB cache and reuse query execution plans, avoiding repeated parsing and planning.
- Declare values after the
CYPHERkeyword usingname=value; reference them as$name. - Prefer parameters for user-supplied values; this also avoids query-injection issues.
- Parameterization does not change the result shape; it only affects planning and safety.