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.
Patterns are fully supported with the exception of the OR (
[:rel_a|:rel_b]) operator to explicitly specify multiple relationship types.
- Nodes are fully supported save that a node can only be associated with a single label.
- Undirected relationships are not supported.
- Path variables (alternating sequence of nodes and relationships)
- Numeric types (though in most cases, we convert integers to 64-bit double representations)
- String literals
- Hexadecimal and octal numerics
NULL is supported as a representation of a missing or undefined value.
Comparability, equality, orderability, and equivalence¶
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.
- OPTIONAL MATCH
- MANDATORY MATCH
- ORDER BY
- ASC and DESC are supported at the level of the sub-clause, but not for individual properties (issue #96)
- We actually implement DETACH DELETE, the distinction being that relationships invalidated by node deletions are automatically deleted.
- REMOVE (to modify properties)
- MERGE is only supported as a standalone clause, and as such cannot be combined with other directives such as MATCH or RETURN.
- CALL (stored procedures)
- UNION / UNION ALL
- Casting functions (toBoolean, toFloat, toInteger)
- Relationship functions (startNode, endNode, type)
- List functions (head, last, length, size)
Math functions - numeric¶
Unsupported function classes¶
- Logarithmetic math functions
- Trigonometric math functions
- List functions
- User-defined functions
- Predicate functions (the only function in this class is EXISTS)
- Multiplication, addition, subtraction, division
- Modulo, exponentiation
String operators (STARTS WITH, ENDS WITH, CONTAINS) are not supported, though equivalent results can be obtained using string functions.
- NOT (currently implemented with the syntax
CASE operators are not supported.
- RedisGraph provides the
GRAPH.EXPLAINcommand to print the execution plan of a provided query.
GRAPH.DELETEwill 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.