Cypher user defined procedures

NameSignatureDescriptionMode
parseProtobufparseProtobuf(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
toProtobuftoProtobuf(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
create.relationshipcreate.relationship(from :: NODE, relType :: STRING, props :: MAP, to :: NODE) :: (rel :: RELATIONSHIP)

Create a relationship with a potentially dynamic name

WRITE
create.setLabelscreate.setLabels(node :: NODE, labels :: LIST OF STRING) :: VOID

Set the labels on the specified input node, overriding any previously set labels

WRITE
create.setPropertycreate.setProperty(node :: NODE, key :: STRING, value :: ANY) :: VOID

Set the property with the provided key on the specified input node

WRITE
cypher.do.casecypher.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.doItcypher.doIt(cypher :: STRING, params :: MAP) :: (value :: MAP)

Executes a Cypher query with the given parameters

WRITE
cypher.runTimeboxedcypher.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.indexesdb.indexes() :: (description :: ANY, indexName :: ANY, tokenNames :: ANY, properties :: ANY, state :: ANY, type :: ANY, progress :: ANY, provider :: ANY, id :: ANY, failureMessage :: ANY)READ
db.propertyKeysdb.propertyKeys() :: (propertyKey :: ANY)READ
db.relationshipTypesdb.relationshipTypes() :: (relationshipType :: ANY)READ
dbms.labelsdbms.labels() :: (label :: ANY)READ
debug.nodedebug.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.sleepdebug.sleep(node :: ANY) :: VOID

Request a node sleep

READ
do.whendo.when(condition :: BOOLEAN, ifQuery :: STRING, elseQuery :: STRING, params :: MAP) :: (value :: MAP)

Depending on the condition execute ifQuery or elseQuery

WRITE
float.addfloat.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
getFilteredEdgesgetFilteredEdges(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
help.functionshelp.functions() :: (name :: STRING, signature :: STRING, description :: STRING)

List registered functions

READ
help.procedureshelp.procedures() :: (name :: STRING, signature :: STRING, description :: STRING, mode :: STRING)

List registered procedures

READ
incrementCounterincrementCounter(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.addint.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
loadJsonLinesloadJsonLines(url :: STRING) :: (value :: ANY)

Load a line-base JSON file, emitting one record per line

READ
loglog(level :: STRING, value :: ANY) :: (log :: STRING)

Log a value to the system console during query execution. Supports levels: error, warn, info, debug, trace.

READ
purgeNodepurgeNode(node :: ANY) :: VOID

Purge a node from history

WRITE
random.walkrandom.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
recentNodeIdsrecentNodeIds(count :: INTEGER) :: (nodeId :: ANY)

Fetch the specified number of IDs of nodes from the in-memory cache

READ
recentNodesrecentNodes(count :: INTEGER) :: (node :: NODE)

Fetch the specified number of nodes from the in-memory cache

READ
reify.timereify.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.insertset.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 add are already present in the list at node[key], this procedure has no effect.

WRITE
set.unionset.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 add will be deduplicated and, for any that are not yet present at node[key], will be stored. If the list at node[key] already contains all elements of add, this procedure has no effect.

WRITE
standing.wiretapstanding.wiretap(options :: MAP) :: (data :: MAP, meta :: MAP)

Stream live results from a running standing query. Returns data and metadata for each match.

READ
subscriberssubscribers(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
subscriptionssubscriptions(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
util.sleeputil.sleep(duration :: INTEGER) :: VOID

Sleep for a certain number of milliseconds

READ