Skip to content

Quine Cypher Procedures

These are the default procedures that come with Quine.

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)

Log the internal state of a node

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
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 the input argument to console

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)

Wire-tap the results of a standing query

READ
subscriberssubscribers(node :: ANY) :: (queryId :: INTEGER, queryDepth :: INTEGER, receiverId :: STRING, lastResult :: ANY)

Return the current state of the standing query subscribers.

READ
subscriptionssubscriptions(node :: ANY) :: (queryId :: INTEGER, queryDepth :: INTEGER, receiverId :: STRING, lastResult :: ANY)

Return the current state of the standing query subscriptions.

READ
util.sleeputil.sleep(duration :: INTEGER) :: VOID

Sleep for a certain number of milliseconds

READ