Cypher user defined procedures
| Name | Signature | Description | Mode |
|---|---|---|---|
create.relationship | create.relationship(from :: NODE, relType :: STRING, props :: MAP, to :: NODE) :: (rel :: RELATIONSHIP) | Create a relationship with a potentially dynamic name | WRITE |
create.setLabels | create.setLabels(node :: NODE, labels :: LIST OF STRING) :: VOID | Set the labels on the specified input node, overriding any previously set labels | WRITE |
create.setProperty | create.setProperty(node :: NODE, key :: STRING, value :: ANY) :: VOID | Set the property with the provided key on the specified input node | WRITE |
cypher.do.case | cypher.do.case(conditionals :: LIST OF ANY, elseQuery :: STRING, params :: MAP) :: (value :: MAP) | Given a list of conditional/query pairs, execute the first query with a true conditional | WRITE |
cypher.doIt | cypher.doIt(cypher :: STRING, params :: MAP) :: (value :: MAP) | Executes a Cypher query with the given parameters | WRITE |
cypher.runTimeboxed | cypher.runTimeboxed(cypher :: STRING, params :: MAP, timeout :: INTEGER) :: (value :: MAP) | Executes a Cypher query with the given parameters but abort after a certain number of milliseconds | WRITE |
db.indexes | db.indexes() :: (description :: ANY, indexName :: ANY, tokenNames :: ANY, properties :: ANY, state :: ANY, type :: ANY, progress :: ANY, provider :: ANY, id :: ANY, failureMessage :: ANY) | READ | |
db.propertyKeys | db.propertyKeys() :: (propertyKey :: ANY) | READ | |
db.relationshipTypes | db.relationshipTypes() :: (relationshipType :: ANY) | READ | |
dbms.labels | dbms.labels() :: (label :: ANY) | READ | |
debug.node | debug.node(node :: ANY) :: (atTime :: LOCALDATETIME, properties :: MAP, edges :: LIST OF ANY, latestUpdateMillisAfterSnapshot :: INTEGER, subscribers :: STRING, subscriptions :: STRING, multipleValuesStandingQueryStates :: LIST OF ANY, journal :: LIST OF ANY, graphNodeHashCode :: INTEGER) | Returns comprehensive internal state of a node including properties, edges, standing query states, and event journal. Useful for debugging why standing queries match or don’t match. | READ |
debug.sleep | debug.sleep(node :: ANY) :: VOID | Request a node sleep | READ |
do.when | do.when(condition :: BOOLEAN, ifQuery :: STRING, elseQuery :: STRING, params :: MAP) :: (value :: MAP) | Depending on the condition execute ifQuery or elseQuery | WRITE |
float.add | float.add(node :: NODE, key :: STRING, add :: FLOAT) :: (result :: FLOAT) | Atomically add to a floating-point property on a node by a certain amount (defaults to 1.0), returning the resultant value | WRITE |
getFilteredEdges | getFilteredEdges(node :: ANY, edgeTypes :: LIST OF STRING, directions :: LIST OF STRING, allowedNodes :: LIST OF ANY) :: (edge :: RELATIONSHIP) | Get edges from a node filtered by edge type, direction, and/or allowed destination nodes | READ |
getHost | getHost(node :: NODE) :: (host :: INTEGER) | Compute which host a node is currently located on | READ |
help.functions | help.functions() :: (name :: STRING, signature :: STRING, description :: STRING) | List registered functions | READ |
help.procedures | help.procedures() :: (name :: STRING, signature :: STRING, description :: STRING, mode :: STRING) | List registered procedures | READ |
history.edgeChanges | history.edgeChanges(node :: NODE, other :: NODE, edgeType :: ANY, direction :: STRING, options :: MAP) :: (action :: STRING, edgeType :: STRING, direction :: STRING, other :: STRING, changeTime :: INTEGER) | Query the historical changes of the half edges a node holds, returning all timestamps when half edges were added or removed | READ |
history.edgeChangesBetween | history.edgeChangesBetween(node :: NODE, other :: NODE, edgeType :: ANY, direction :: STRING, options :: MAP) :: (action :: STRING, edgeType :: STRING, direction :: STRING, other :: STRING, changeTime :: INTEGER) | Query the historical changes of whole edges between two nodes, reporting an edge as added only once both nodes hold their half and as removed as soon as either drops it | READ |
history.nodeAt | history.nodeAt(node :: NODE, atTime :: INTEGER) :: (node :: NODE, edges :: LIST OF ANY) | Read a node as it stood at a historical moment, with its properties, labels, and edges | READ |
history.nodeChanges | history.nodeChanges(node :: NODE, options :: MAP) :: (kind :: STRING, detail :: MAP, changeTime :: INTEGER) | Query everything a node recorded about itself over time, reporting property and edge changes together | READ |
history.propertyChanges | history.propertyChanges(node :: NODE, propertyKey :: STRING, options :: MAP) :: (key :: STRING, value :: ANY, previousValue :: ANY, changeTime :: INTEGER) | Query the historical changes of properties on a node, returning all timestamps and values when the properties were changed | READ |
history.queryAt | history.queryAt(query :: STRING, atTime :: INTEGER, parameters :: MAP) :: (value :: MAP) | Run a read-only Cypher query as of a historical moment | READ |
incrementCounter | incrementCounter(node :: NODE, key :: STRING, amount :: INTEGER) :: (count :: INTEGER) | Atomically increment an integer property on a node by a certain amount, returning the resultant value | WRITE |
int.add | int.add(node :: NODE, key :: STRING, add :: INTEGER) :: (result :: INTEGER) | Atomically add to an integer property on a node by a certain amount (defaults to 1), returning the resultant value | WRITE |
loadJsonLines | loadJsonLines(url :: STRING) :: (value :: ANY) | Load a line-base JSON file, emitting one record per line | READ |
log | log(level :: STRING, value :: ANY) :: (log :: STRING) | Log a value to the system console during query execution. Supports levels: error, warn, info, debug, trace. | READ |
parseProtobuf | parseProtobuf(bytes :: BYTES, schemaUrl :: STRING, typeName :: STRING) :: (value :: MAP) | Parses a protobuf message into a Cypher map value, or null if the bytes are not parseable as the requested type | READ |
purgeNode | purgeNode(node :: ANY) :: VOID | Purge a node from history | WRITE |
random.walk | random.walk(start :: ANY, depth :: INTEGER, return :: FLOAT, in-out :: FLOAT, seed :: STRING) :: (walk :: LIST OF STRING) | Randomly walk edges from a starting node for a chosen depth. Returns a list of node IDs in the order they were encountered. | READ |
recentNodeIds | recentNodeIds(count :: INTEGER) :: (nodeId :: ANY) | Fetch the specified number of IDs of nodes from the in-memory cache | READ |
recentNodes | recentNodes(count :: INTEGER) :: (node :: NODE) | Fetch the specified number of nodes from the in-memory cache | READ |
reify.time | reify.time(timestamp :: DATETIME, periods :: LIST OF STRING) :: (node :: NODE) | Reifies the timestamp into a [sub]graph of time nodes, where each node represents one period (at the granularity of the period specifiers provided). Yields the reified nodes with the finest granularity. | WRITE |
set.insert | set.insert(node :: NODE, key :: STRING, add :: ANY) :: (result :: LIST OF ANY) | Atomically add an element to a list property treated as a set. If one or more instances of | WRITE |
set.union | set.union(node :: NODE, key :: STRING, add :: LIST OF ANY) :: (result :: LIST OF ANY) | Atomically add set of elements to a list property treated as a set. The elements in | WRITE |
standing.wiretap | standing.wiretap(options :: MAP) :: (data :: MAP, meta :: MAP) | Stream live results from a running standing query. Returns data and metadata for each match. | READ |
subscribers | subscribers(node :: ANY) :: (dgnId :: INTEGER, subscriber :: STRING, forQueries :: ANY, lastResult :: ANY) | Returns who is subscribed to this node for standing query updates, and which standing queries each of them depends on this node for. Useful for tracing standing query propagation. | READ |
subscriptions | subscriptions(node :: ANY) :: (dgnId :: INTEGER, peer :: STRING, forQueries :: ANY, answer :: ANY) | Returns the nodes this node subscribes to for standing query updates, and which standing queries each subscription was made on behalf of. Useful for tracing standing query propagation. | READ |
toProtobuf | toProtobuf(value :: MAP, schemaUrl :: STRING, typeName :: STRING) :: (protoBytes :: BYTES) | Serializes a Cypher value into bytes, according to a protobuf schema. Returns null if the value is not serializable as the requested type | READ |
util.sleep | util.sleep(duration :: INTEGER) :: VOID | Sleep for a certain number of milliseconds | READ |