title | linkTitle | weight | description |
---|---|---|---|
Cypher coverage |
Cypher coverage |
7 |
RedisGraph implements a subset of the Cypher language, which is growing as development continues. This document is based on the Cypher Query Language Reference (version 9), available at [OpenCypher Resources](https://www.opencypher.org/resources).
|
Patterns are fully supported.
- Nodes
- Relationships
- Path variables (alternating sequence of nodes and relationships).
-
Lists
-
Maps
Unsupported:
- Temporal types (Date, DateTime, LocalDateTime, Time, LocalTime, Duration)
-
Numeric types (64-bit doubles and 64-bit signed integer representations)
-
String literals
-
Booleans
Unsupported:
- Hexadecimal and octal numerics
NULL is supported as a representation of a missing or undefined value.
This is a somewhat nebulous area in Cypher itself, with a lot of edge cases. Broadly speaking, RedisGraph behaves as expected with string and numeric values. There are likely some behaviors involving the numerics NaN, -inf, inf, and possibly -0.0 that deviate from the Cypher standard. We do not support any of these properties at the type level, meaning nodes and relationships are not internally comparable.
- MATCH
- OPTIONAL MATCH
- RETURN
- AS
- WITH
- UNWIND
- WHERE
- ORDER BY
- SKIP
- LIMIT
-
CREATE
-
DELETE
- We actually implement DETACH DELETE, the distinction being that relationships invalidated by node deletions are automatically deleted.
-
SET
Unsupported:
- REMOVE (to modify properties)
- Properties can be deleted with SET [prop] = NULL.
- MERGE
- CALL (procedures)
- The currently-supported procedures are listed in the Procedures documentation.
- UNION
- UNION ALL
The currently-supported functions are listed in the Functions documentation.
Unsupported:
- Temporal arithmetic functions
- User-defined functions
The currently-supported functions are listed in the mathematical operators documentation.
-
String operators (STARTS WITH, ENDS WITH, CONTAINS) are supported.
Unsupported:
- Regex operator
- AND
- OR
- NOT
- XOR
Parameters may be specified to allow for more flexible query construction:
CYPHER name_param = "Niccolò Machiavelli" birth_year_param = 1469 MATCH (p:Person {name: $name_param, birth_year: $birth_year_param}) RETURN p
The example above shows the syntax used by redis-cli
to set parameters, but
each RedisGraph client introduces a language-appropriate method for setting parameters,
and is described in their documentation.
- RedisGraph provides the
GRAPH.EXPLAIN
command to print the execution plan of a provided query. GRAPH.DELETE
will remove a graph and all Redis keys associated with it.
- We do not currently provide support for queries that retrieve schemas, though the LABELS and TYPE scalar functions may be used to get a graph overview.