graflo.db.cypher.escape¶
Cypher string and identifier escaping for safe query fragments.
Functions:¶
cypher_map_key(name)
¶
Return a backtick-quoted map-key / property name for Cypher patterns.
Surrounding whitespace is dropped first; embedded backticks are doubled, so two names differing only by a backtick stay two keys.
Source code in graflo/db/cypher/escape.py
cypher_name(name, *, quoted=False)
¶
A label, relationship type, property key or alias as one Cypher token.
An identifier that is not a reserved word is written as is unless quoted; any other name is backtick-quoted with embedded backticks doubled, so a name taken from a schema can never end the token and add query text of its own.
Raises:
| Type | Description |
|---|---|
ValueError
|
if name is empty. |
Source code in graflo/db/cypher/escape.py
cypher_names(names)
¶
One relationship type, or several joined with |, each one token.