Functions And Procedures
Use scalar functions in expressions and procedures with CALL … YIELD in Cypher. This reference lists available names, returned fields, and argument restrictions. Cypher contains complete graph-algorithm queries, and Multimodal queries shows vector and KV composition.
Scalar And Row Functions
| Function | Use | Notes |
|---|---|---|
|
Count rows, non-null values, or distinct non-null values. |
Empty global counts return zero; grouped empty input has no groups. |
|
Collect non-null values into a list. |
Empty global input returns |
|
Aggregate values. |
Empty global |
|
Choose the first non-null expression. |
Useful for optional bindings and missing properties; returns null if all arguments are null. |
|
Inspect or transform supported lists/strings. |
Null inputs propagate null. |
|
Return hop count for a materialized path alias. |
Works for supported |
|
Return ordered node IDs from a path value. |
Preserves path order. |
|
Return ordered relationship descriptors from a path value. |
Uses a stable inspection shape. |
Aggregate functions work in supported WITH and RETURN projections.
CASE, comprehensions, quantified predicates and COUNT { … } / COLLECT { … } are expression syntax, not additional callable procedures.
See Cypher for examples and Cypher And openCypher Compatibility for scope restrictions.
Vector And KV Procedures
| Procedure | Typical output | Use |
|---|---|---|
|
|
Nearest-neighbor search over a vector index. |
|
|
Read a payload from the public |
The public PutKeyValue RPC writes to default. Numeric resource IDs address
the internal resource index and are reserved for system-context query paths.
SpaceKey
CALL spacekey.search(index, options) YIELD … performs exact spatiotemporal lookup over a durable observation index.
See Geospatial and spatiotemporal indexing for coordinate systems, ingestion, limits, and the equivalent SPARQL SERVICE.
Graph Analytics Procedures
| Procedure | Typical output | Notes |
|---|---|---|
|
|
Runs PageRank over a pinned graph projection. |
|
|
Weakly connected components over selected relationship types. |
|
|
Degree centrality over selected orientation. |
|
|
Alias-style centrality naming. |
|
|
Closeness centrality for supported projections. |
|
|
Alias-style centrality naming. |
|
|
Supports exact or sampled behavior depending on options and budget. |
|
|
Alias-style centrality naming. |
Choose existing labels, relationship types, and node identifiers from your dataset. Weighted algorithms also require a numeric relationship property in the expected units.
Common analytics options include relationshipTypes, nodeLabels, orientation, topK, and algorithm-specific controls such as maxIterations, tolerance, dampingFactor, or sourceSampleSize.
Weighted Path Procedures
| Procedure | Use | Important constraints |
|---|---|---|
|
Positive-weight shortest paths. |
Requires finite positive relationship weights. |
|
Positive-weight shortest paths with coordinate heuristic. |
Requires valid lat/lon properties and conservative heuristic validation, or explicit fallback to Dijkstra. |
|
Exact k-shortest loopless paths. |
Requires positive weights and bounded |
|
Shortest paths with negative weights. |
Negative cycles are diagnostics, not normal answers. |
|
Budgeted all-pairs shortest paths. |
Large all-pairs expansion requires source/target/pair budgets. |
Write-back procedures are governed separately and feature-flagged. Do not assume write mode is available in a default deployment.
Unsupported Or Guarded Cases
ShrikeDB intentionally rejects:
-
NaN or infinite weights;
-
zero or negative weights for Dijkstra, A*, and Yen;
-
arbitrary runtime weight expressions in the current weighted-path track;
-
unbounded all-pairs output;
-
analytics mutate/write modes unless the specific governed feature is enabled.