Cypher And openCypher Compatibility
ShrikeDB implements a growing set of Cypher and openCypher-style query features, plus its own multimodal and analytics extensions. Use this reference when adapting queries from another Cypher database. Clause restrictions and relationship identity can change which queries execute and how many rows they return.
See Cypher for read-query recipes and Cypher Writes And Schema for governed writes and schema commands.
Clauses And Expressions
| Surface | Implemented scope | Boundary |
|---|---|---|
|
Node/relationship patterns, labels, property filters, projections and aliases; multiple |
Execution depends on the admitted pattern shape. Relationship identity uses the set-edge model described below. |
Standalone |
Scalar, list and map expressions without a graph scan. |
Function names and argument types must be supported by the function registry. |
|
Projection, aliases, scope reset and post-projection |
Start with a row-producing clause. |
|
Left-join lowering over an existing row stream, with null extension for missing matches and optional-side predicates. |
A leading |
|
List expressions produce one row per element; supports list/aggregate pipelines. |
A configurable row cap bounds expansion. Use |
Aggregation and |
|
Aggregates must be top-level projection items. |
|
Ordering and pagination of supported row and aggregate projections. |
Pagination without an explicit ordering is not a stable page-selection contract. |
|
Duplicate-eliminating and duplicate-preserving branch unions. |
Branches must have compatible output column names. Mixing the two union modes in one query and unions inside subqueries are rejected. |
Null-aware predicates and |
|
Null is an unknown value, not an ordinary equality key. See the null rules below. |
Lists, maps and strings |
List/map literals, indexing, list slicing, string predicates and supported utility/scalar functions. |
Invalid non-null argument types are errors; a function name present in another Cypher implementation is not automatically supported here. |
List comprehensions and quantifiers |
|
Null-aware evaluation and bounded result construction; loop variables have local scope. |
Pattern comprehensions |
Read-only fixed-pattern branches with an optional filter and mapped result. |
Variable-length pattern comprehensions are rejected; nested output is bounded. |
Read-only subqueries |
|
No mutation, schema commands or |
|
Bounded read-only subquery expressions. |
|
Bounded relationship paths and named paths |
Finite lower/upper bounds, zero-hop matches and supported |
Unbounded paths and unsupported relationship-variable bindings in bounded clauses are rejected; resource limits apply. |
Graph writes and |
Governed |
Default-off governed executor, legacy fast-path exceptions, single-label creation guidance and explicit unsupported forms: Cypher Writes And Schema. |
Schema and inspection |
Scoped index/constraint commands, |
Index creation builds and maintains an exact label/property map. Uniqueness and property-existence constraints validate current data and guard subsequent node writes. |
Nulls And Empty Aggregates
-
Missing node properties and unmatched optional bindings evaluate to
NULL; a missing graph node can still be an error. -
NULL = NULLevaluates toNULL. UseIS NULLto test for null. -
WHEREkeeps true predicates; false and null predicates do not pass. -
false AND NULLis false,true OR NULLis true, andNOT NULLis null. -
2 IN [1, NULL]is null because no definite match was found and one candidate is unknown. -
count(*)counts rows, including a null-extended optional row.count(expr)counts non-null values;collect(expr)omits null values. -
Empty global aggregation returns one row: zero counts, an empty collection, zero sum, and null average/minimum/maximum. Grouped aggregation over no input groups returns no rows.
Path And Relationship Semantics
For bounded MATCH clauses, traversal enforces relationship uniqueness across fixed segments, variable-length segments and comma-separated paths in that clause.
Separate MATCH clauses may reuse an edge.
A node can be revisited through different relationships; path matching is not restricted to simple node paths.
ShrikeDB’s canonical relationship identity is (source, type, target).
Parallel relationships with identical endpoints and type are not independent identities as they can be in Neo4j.
Account for this difference when importing a graph or comparing multiplicities.
*..3 has an omitted lower bound of one; use *0..3 to include zero hops.
Endpoint bindings, labels and property filters are checked against the published snapshot.
Limits stop excessive path/candidate expansion with an error rather than returning a silently truncated count.