Cypher Language

Documention for the Cypher language is still forthcoming. Meanwhile, the OpenCypher language reference can be found at https://s3.amazonaws.com/artifacts.opencypher.org/openCypher9.pdf.

Built-in Cypher Functions

These are functions that are part of the Cypher language.

NameSignatureDescription
absabs(NUMBER?) :: NUMBER?

absolute value of a number

acosacos(NUMBER?) :: FLOAT?

arcosine (in radians) of a number

asinasin(NUMBER?) :: FLOAT?

arcsine (in radians) of a number

atanatan(NUMBER?) :: FLOAT?

arctangent (in radians) of a number

atan2atan2(NUMBER?, NUMBER?) :: FLOAT?

arctangent (in radians) of the quotient of its arguments

ceilceil(NUMBER?) :: NUMBER?

smallest integer greater than or equal to the input

coalescecoalesce(ANY?, ..) :: ANY?

returns the first non-null value in a list of expressions

coscos(NUMBER?) :: FLOAT?

cosine of a number of radians

cotcot(NUMBER?) :: FLOAT?

cotangent of a number of radians

degreesdegrees(NUMBER?) :: FLOAT?

convert radians to degrees

ee() :: FLOAT?

mathematical constant e

expexp(NUMBER?) :: FLOAT?

return the mathematical constant e raised to the power of the input

floorfloor(NUMBER?) :: NUMBER?

largest integer less than or equal to the input

haversinhaversin(NUMBER?) :: FLOAT?

half the versine of a number

headhead(LIST? OF ANY?) :: ANY?

extract the first element of a list

idid(NODE?) :: ANY?

extract the ID of a node

keyskeys(ANY?) :: LIST? OF STRING?

extract the keys from a map, node, or relationship

lTrimlTrim(STRING?) :: STRING?

original string with leading whitespace removed

labelslabels(ANY?) :: LIST? OF STRING?

extract the labels of a node or relationship

lastlast(LIST? OF ANY?) :: ANY?

extract the last element of a list

leftleft(STRING?, INTEGER?) :: STRING?

string containing the specified number of leftmost characters of the original string

lengthlength(PATH?) :: INTEGER?

length of a path (ie. the number of relationships in it)

loglog(NUMBER?) :: FLOAT?

natural logarithm of a number

log10log10(NUMBER?) :: FLOAT?

common logarithm (base 10) of a number

nodesnodes(PATH?) :: LIST? OF NODE?

extract a list of nodes in a path

pipi() :: FLOAT?

mathematical constant π

propertiesproperties(ANY?) :: MAP?

extract the properties from a map, node, or relationship

rTrimrTrim(STRING?) :: STRING?

original string with trailing whitespace removed

randrand() :: FLOAT?

random float between 0 (inclusive) and 1 (exclusive)

rangerange(start :: INTEGER?, end :: INTEGER, step :: INTEGER) :: LIST? OF INTEGER?

construct a list of integers representing a range

relationshipsrelationships(PATH?) :: LIST? OF RELATIONSHIP?

extract a list of relationships in a path

replacereplace(original :: STRING?, target :: STRING?, replacement :: STRING?) :: STRING?

replace every occurrence of a target string

reversereverse(ANY?) :: ANY?

reverse a string or list

rightright(STRING?, INTEGER?) :: STRING?

string containing the specified number of rightmost characters of the original string

signsign(NUMBER?) :: INTEGER?

signum of a number

sinsin(NUMBER?) :: FLOAT?

sine of a number of radians

sizesize(ANY?) :: INTEGER?

number of elements in a list or characters in a string

splitsplit(input :: STRING?, delimiter :: STRING?) :: LIST? OF STRING?

split a string on every instance of a delimiter

sqrtsqrt(NUMBER?) :: FLOAT?

square root of a number

substringsubstring(original :: STRING?, start :: INTEGER? [, end :: INTEGER? ]) :: STRING?

substring of the original string, beginning with a 0-based index start and length

tailtail(LIST? OF ANY?) :: LIST? OF ANY?

return the list without its first element

tantan(NUMBER?) :: FLOAT?

tangent of a number of radians

timestamptimestamp() :: INTEGER?

number of milliseconds elapsed since midnight, January 1, 1970 UTC

toBooleantoBoolean(STRING?) :: BOOLEAN?

convert a string into a boolean

toFloattoFloat(ANY?) :: FLOAT?

convert a string or integer into a float

toIntegertoInteger(ANY?) :: INTEGER?

convert a string or float into an integer

toLowertoLower(STRING?) :: STRING?

convert a string to lowercase

toStringtoString(ANY?) :: STRING?

convert a value to a string

toUppertoUpper(STRING?) :: STRING?

convert a string to uppercase

trimtrim(STRING?) :: STRING?

removing leading and trailing whitespace from a string

typetype(RELATIONSHIP?) :: STRING?

return the name of a relationship

User-defined Cypher Functions

These are the default additional functions that come with Quine Enterprise. More user defined functions can be added by following these instructions.

NameSignatureDescription
bytesbytes(input :: STRING) :: BYTES

Returns bytes represented by a hexadecimal string

castOrNull.booleancastOrNull.boolean(value :: ANY) :: BOOLEAN

Casts the provided value to the type Bool. If the provided value is not already an instance of the requested type, this will return null. For functions that convert between types, see toInteger et al. This can be useful to recover type information in cases where the Cypher compiler is unable to fully track types on its own. This is most common when dealing with lists, due to the limited support for higher-kinded types within the Cypher language.

castOrNull.bytescastOrNull.bytes(value :: ANY) :: BYTES

Casts the provided value to the type Bytes. If the provided value is not already an instance of the requested type, this will return null. For functions that convert between types, see toInteger et al. This can be useful to recover type information in cases where the Cypher compiler is unable to fully track types on its own. This is most common when dealing with lists, due to the limited support for higher-kinded types within the Cypher language.

castOrNull.datetimecastOrNull.datetime(value :: ANY) :: DATETIME

Casts the provided value to the type DateTime. If the provided value is not already an instance of the requested type, this will return null. For functions that convert between types, see toInteger et al. This can be useful to recover type information in cases where the Cypher compiler is unable to fully track types on its own. This is most common when dealing with lists, due to the limited support for higher-kinded types within the Cypher language.

castOrNull.durationcastOrNull.duration(value :: ANY) :: DURATION

Casts the provided value to the type Duration. If the provided value is not already an instance of the requested type, this will return null. For functions that convert between types, see toInteger et al. This can be useful to recover type information in cases where the Cypher compiler is unable to fully track types on its own. This is most common when dealing with lists, due to the limited support for higher-kinded types within the Cypher language.

castOrNull.floatcastOrNull.float(value :: ANY) :: FLOAT

Casts the provided value to the type Floating. If the provided value is not already an instance of the requested type, this will return null. For functions that convert between types, see toInteger et al. This can be useful to recover type information in cases where the Cypher compiler is unable to fully track types on its own. This is most common when dealing with lists, due to the limited support for higher-kinded types within the Cypher language.

castOrNull.integercastOrNull.integer(value :: ANY) :: INTEGER

Casts the provided value to the type Integer. If the provided value is not already an instance of the requested type, this will return null. For functions that convert between types, see toInteger et al. This can be useful to recover type information in cases where the Cypher compiler is unable to fully track types on its own. This is most common when dealing with lists, due to the limited support for higher-kinded types within the Cypher language.

castOrNull.listcastOrNull.list(value :: ANY) :: LIST OF ANY

Casts the provided value to the type List(Anything). If the provided value is not already an instance of the requested type, this will return null. For functions that convert between types, see toInteger et al. This can be useful to recover type information in cases where the Cypher compiler is unable to fully track types on its own. This is most common when dealing with lists, due to the limited support for higher-kinded types within the Cypher language.

castOrNull.localdatetimecastOrNull.localdatetime(value :: ANY) :: LOCALDATETIME

Casts the provided value to the type LocalDateTime. If the provided value is not already an instance of the requested type, this will return null. For functions that convert between types, see toInteger et al. This can be useful to recover type information in cases where the Cypher compiler is unable to fully track types on its own. This is most common when dealing with lists, due to the limited support for higher-kinded types within the Cypher language.

castOrNull.mapcastOrNull.map(value :: ANY) :: MAP

Casts the provided value to the type Map. If the provided value is not already an instance of the requested type, this will return null. For functions that convert between types, see toInteger et al. This can be useful to recover type information in cases where the Cypher compiler is unable to fully track types on its own. This is most common when dealing with lists, due to the limited support for higher-kinded types within the Cypher language.

castOrNull.nodecastOrNull.node(value :: ANY) :: NODE

Casts the provided value to the type Node. If the provided value is not already an instance of the requested type, this will return null. For functions that convert between types, see toInteger et al. This can be useful to recover type information in cases where the Cypher compiler is unable to fully track types on its own. This is most common when dealing with lists, due to the limited support for higher-kinded types within the Cypher language.

castOrNull.pathcastOrNull.path(value :: ANY) :: PATH

Casts the provided value to the type Path. If the provided value is not already an instance of the requested type, this will return null. For functions that convert between types, see toInteger et al. This can be useful to recover type information in cases where the Cypher compiler is unable to fully track types on its own. This is most common when dealing with lists, due to the limited support for higher-kinded types within the Cypher language.

castOrNull.relationshipcastOrNull.relationship(value :: ANY) :: RELATIONSHIP

Casts the provided value to the type Relationship. If the provided value is not already an instance of the requested type, this will return null. For functions that convert between types, see toInteger et al. This can be useful to recover type information in cases where the Cypher compiler is unable to fully track types on its own. This is most common when dealing with lists, due to the limited support for higher-kinded types within the Cypher language.

castOrNull.stringcastOrNull.string(value :: ANY) :: STRING

Casts the provided value to the type Str. If the provided value is not already an instance of the requested type, this will return null. For functions that convert between types, see toInteger et al. This can be useful to recover type information in cases where the Cypher compiler is unable to fully track types on its own. This is most common when dealing with lists, due to the limited support for higher-kinded types within the Cypher language.

castOrThrow.booleancastOrThrow.boolean(value :: ANY) :: BOOLEAN

Adds a runtime assertion that the provided value is actually of type Bool. This can be useful to recover type information in cases where the Cypher compiler is unable to fully track types on its own. This is most common when dealing with lists, due to the limited support for higher-kinded types within the Cypher language.

castOrThrow.bytescastOrThrow.bytes(value :: ANY) :: BYTES

Adds a runtime assertion that the provided value is actually of type Bytes. This can be useful to recover type information in cases where the Cypher compiler is unable to fully track types on its own. This is most common when dealing with lists, due to the limited support for higher-kinded types within the Cypher language.

castOrThrow.datetimecastOrThrow.datetime(value :: ANY) :: DATETIME

Adds a runtime assertion that the provided value is actually of type DateTime. This can be useful to recover type information in cases where the Cypher compiler is unable to fully track types on its own. This is most common when dealing with lists, due to the limited support for higher-kinded types within the Cypher language.

castOrThrow.durationcastOrThrow.duration(value :: ANY) :: DURATION

Adds a runtime assertion that the provided value is actually of type Duration. This can be useful to recover type information in cases where the Cypher compiler is unable to fully track types on its own. This is most common when dealing with lists, due to the limited support for higher-kinded types within the Cypher language.

castOrThrow.floatcastOrThrow.float(value :: ANY) :: FLOAT

Adds a runtime assertion that the provided value is actually of type Floating. This can be useful to recover type information in cases where the Cypher compiler is unable to fully track types on its own. This is most common when dealing with lists, due to the limited support for higher-kinded types within the Cypher language.

castOrThrow.integercastOrThrow.integer(value :: ANY) :: INTEGER

Adds a runtime assertion that the provided value is actually of type Integer. This can be useful to recover type information in cases where the Cypher compiler is unable to fully track types on its own. This is most common when dealing with lists, due to the limited support for higher-kinded types within the Cypher language.

castOrThrow.listcastOrThrow.list(value :: ANY) :: LIST OF ANY

Adds a runtime assertion that the provided value is actually of type List(Anything). This can be useful to recover type information in cases where the Cypher compiler is unable to fully track types on its own. This is most common when dealing with lists, due to the limited support for higher-kinded types within the Cypher language.

castOrThrow.localdatetimecastOrThrow.localdatetime(value :: ANY) :: LOCALDATETIME

Adds a runtime assertion that the provided value is actually of type LocalDateTime. This can be useful to recover type information in cases where the Cypher compiler is unable to fully track types on its own. This is most common when dealing with lists, due to the limited support for higher-kinded types within the Cypher language.

castOrThrow.mapcastOrThrow.map(value :: ANY) :: MAP

Adds a runtime assertion that the provided value is actually of type Map. This can be useful to recover type information in cases where the Cypher compiler is unable to fully track types on its own. This is most common when dealing with lists, due to the limited support for higher-kinded types within the Cypher language.

castOrThrow.nodecastOrThrow.node(value :: ANY) :: NODE

Adds a runtime assertion that the provided value is actually of type Node. This can be useful to recover type information in cases where the Cypher compiler is unable to fully track types on its own. This is most common when dealing with lists, due to the limited support for higher-kinded types within the Cypher language.

castOrThrow.pathcastOrThrow.path(value :: ANY) :: PATH

Adds a runtime assertion that the provided value is actually of type Path. This can be useful to recover type information in cases where the Cypher compiler is unable to fully track types on its own. This is most common when dealing with lists, due to the limited support for higher-kinded types within the Cypher language.

castOrThrow.relationshipcastOrThrow.relationship(value :: ANY) :: RELATIONSHIP

Adds a runtime assertion that the provided value is actually of type Relationship. This can be useful to recover type information in cases where the Cypher compiler is unable to fully track types on its own. This is most common when dealing with lists, due to the limited support for higher-kinded types within the Cypher language.

castOrThrow.stringcastOrThrow.string(value :: ANY) :: STRING

Adds a runtime assertion that the provided value is actually of type Str. This can be useful to recover type information in cases where the Cypher compiler is unable to fully track types on its own. This is most common when dealing with lists, due to the limited support for higher-kinded types within the Cypher language.

clusterPositionclusterPosition() :: INTEGER

Returns the cluster position occupied by this member

coll.maxcoll.max(value :: LIST OF ANY) :: ANY

Computes the maximum of values in a list

coll.max(input0 :: ANY) :: ANY

Computes the maximum argument

coll.max(input0 :: ANY, input1 :: ANY) :: ANY

Computes the maximum argument

coll.max(input0 :: ANY, input1 :: ANY, input2 :: ANY) :: ANY

Computes the maximum argument

coll.max(input0 :: ANY, input1 :: ANY, input2 :: ANY, input3 :: ANY) :: ANY

Computes the maximum argument

coll.max(input0 :: ANY, input1 :: ANY, input2 :: ANY, input3 :: ANY, input4 :: ANY) :: ANY

Computes the maximum argument

coll.max(input0 :: ANY, input1 :: ANY, input2 :: ANY, input3 :: ANY, input4 :: ANY, input5 :: ANY) :: ANY

Computes the maximum argument

coll.max(input0 :: ANY, input1 :: ANY, input2 :: ANY, input3 :: ANY, input4 :: ANY, input5 :: ANY, input6 :: ANY) :: ANY

Computes the maximum argument

coll.max(input0 :: ANY, input1 :: ANY, input2 :: ANY, input3 :: ANY, input4 :: ANY, input5 :: ANY, input6 :: ANY, input7 :: ANY) :: ANY

Computes the maximum argument

coll.max(input0 :: ANY, input1 :: ANY, input2 :: ANY, input3 :: ANY, input4 :: ANY, input5 :: ANY, input6 :: ANY, input7 :: ANY, input8 :: ANY) :: ANY

Computes the maximum argument

coll.max(input0 :: ANY, input1 :: ANY, input2 :: ANY, input3 :: ANY, input4 :: ANY, input5 :: ANY, input6 :: ANY, input7 :: ANY, input8 :: ANY, input9 :: ANY) :: ANY

Computes the maximum argument

coll.max(input0 :: ANY, input1 :: ANY, input2 :: ANY, input3 :: ANY, input4 :: ANY, input5 :: ANY, input6 :: ANY, input7 :: ANY, input8 :: ANY, input9 :: ANY, input10 :: ANY) :: ANY

Computes the maximum argument

coll.max(input0 :: ANY, input1 :: ANY, input2 :: ANY, input3 :: ANY, input4 :: ANY, input5 :: ANY, input6 :: ANY, input7 :: ANY, input8 :: ANY, input9 :: ANY, input10 :: ANY, input11 :: ANY) :: ANY

Computes the maximum argument

coll.max(input0 :: ANY, input1 :: ANY, input2 :: ANY, input3 :: ANY, input4 :: ANY, input5 :: ANY, input6 :: ANY, input7 :: ANY, input8 :: ANY, input9 :: ANY, input10 :: ANY, input11 :: ANY, input12 :: ANY) :: ANY

Computes the maximum argument

coll.max(input0 :: ANY, input1 :: ANY, input2 :: ANY, input3 :: ANY, input4 :: ANY, input5 :: ANY, input6 :: ANY, input7 :: ANY, input8 :: ANY, input9 :: ANY, input10 :: ANY, input11 :: ANY, input12 :: ANY, input13 :: ANY) :: ANY

Computes the maximum argument

coll.max(input0 :: ANY, input1 :: ANY, input2 :: ANY, input3 :: ANY, input4 :: ANY, input5 :: ANY, input6 :: ANY, input7 :: ANY, input8 :: ANY, input9 :: ANY, input10 :: ANY, input11 :: ANY, input12 :: ANY, input13 :: ANY, input14 :: ANY) :: ANY

Computes the maximum argument

coll.mincoll.min(value :: LIST OF ANY) :: ANY

Computes the minimum of values in a list

coll.min(input0 :: ANY) :: ANY

Computes the minimum argument

coll.min(input0 :: ANY, input1 :: ANY) :: ANY

Computes the minimum argument

coll.min(input0 :: ANY, input1 :: ANY, input2 :: ANY) :: ANY

Computes the minimum argument

coll.min(input0 :: ANY, input1 :: ANY, input2 :: ANY, input3 :: ANY) :: ANY

Computes the minimum argument

coll.min(input0 :: ANY, input1 :: ANY, input2 :: ANY, input3 :: ANY, input4 :: ANY) :: ANY

Computes the minimum argument

coll.min(input0 :: ANY, input1 :: ANY, input2 :: ANY, input3 :: ANY, input4 :: ANY, input5 :: ANY) :: ANY

Computes the minimum argument

coll.min(input0 :: ANY, input1 :: ANY, input2 :: ANY, input3 :: ANY, input4 :: ANY, input5 :: ANY, input6 :: ANY) :: ANY

Computes the minimum argument

coll.min(input0 :: ANY, input1 :: ANY, input2 :: ANY, input3 :: ANY, input4 :: ANY, input5 :: ANY, input6 :: ANY, input7 :: ANY) :: ANY

Computes the minimum argument

coll.min(input0 :: ANY, input1 :: ANY, input2 :: ANY, input3 :: ANY, input4 :: ANY, input5 :: ANY, input6 :: ANY, input7 :: ANY, input8 :: ANY) :: ANY

Computes the minimum argument

coll.min(input0 :: ANY, input1 :: ANY, input2 :: ANY, input3 :: ANY, input4 :: ANY, input5 :: ANY, input6 :: ANY, input7 :: ANY, input8 :: ANY, input9 :: ANY) :: ANY

Computes the minimum argument

coll.min(input0 :: ANY, input1 :: ANY, input2 :: ANY, input3 :: ANY, input4 :: ANY, input5 :: ANY, input6 :: ANY, input7 :: ANY, input8 :: ANY, input9 :: ANY, input10 :: ANY) :: ANY

Computes the minimum argument

coll.min(input0 :: ANY, input1 :: ANY, input2 :: ANY, input3 :: ANY, input4 :: ANY, input5 :: ANY, input6 :: ANY, input7 :: ANY, input8 :: ANY, input9 :: ANY, input10 :: ANY, input11 :: ANY) :: ANY

Computes the minimum argument

coll.min(input0 :: ANY, input1 :: ANY, input2 :: ANY, input3 :: ANY, input4 :: ANY, input5 :: ANY, input6 :: ANY, input7 :: ANY, input8 :: ANY, input9 :: ANY, input10 :: ANY, input11 :: ANY, input12 :: ANY) :: ANY

Computes the minimum argument

coll.min(input0 :: ANY, input1 :: ANY, input2 :: ANY, input3 :: ANY, input4 :: ANY, input5 :: ANY, input6 :: ANY, input7 :: ANY, input8 :: ANY, input9 :: ANY, input10 :: ANY, input11 :: ANY, input12 :: ANY, input13 :: ANY) :: ANY

Computes the minimum argument

coll.min(input0 :: ANY, input1 :: ANY, input2 :: ANY, input3 :: ANY, input4 :: ANY, input5 :: ANY, input6 :: ANY, input7 :: ANY, input8 :: ANY, input9 :: ANY, input10 :: ANY, input11 :: ANY, input12 :: ANY, input13 :: ANY, input14 :: ANY) :: ANY

Computes the minimum argument

convert.stringToBytesconvert.stringToBytes(input :: STRING, encoding :: STRING) :: BYTES

Encodes a string into bytes according to the specified encoding

datedate() :: DATE

Get the current local date

date(options :: MAP) :: DATE

Construct a local date from the options

date(date :: STRING) :: DATE

Parse a local date from a string

date(date :: STRING, format :: STRING) :: DATE

Parse a local date from a string using a custom format

datetimedatetime() :: DATETIME

Get the current date time

datetime(options :: MAP) :: DATETIME

Construct a date time from the options

datetime(datetime :: STRING) :: DATETIME

Parse a date time from a string

datetime(datetime :: STRING, format :: STRING) :: DATETIME

Parse a local date time from a string using a custom format

durationduration(options :: MAP) :: DURATION

Construct a duration from the options

duration(duration :: STRING) :: DURATION

Parse a duration from a string

duration.betweenduration.between(date1 :: LOCALDATETIME, date2 :: LOCALDATETIME) :: DURATION

Compute the duration between two local dates

duration.between(date1 :: DATETIME, date2 :: DATETIME) :: DURATION

Compute the duration between two dates

gen.boolean.fromgen.boolean.from(fromValue :: ANY) :: BOOLEAN

Deterministically generate a random boolean from the provided input.

gen.boolean.from(fromValue :: ANY, withSize :: INTEGER) :: BOOLEAN

Deterministically generate a random boolean from the provided input.

gen.bytes.fromgen.bytes.from(fromValue :: ANY) :: BYTES

Deterministically generate a random bytes from the provided input.

gen.bytes.from(fromValue :: ANY, withSize :: INTEGER) :: BYTES

Deterministically generate a random bytes from the provided input.

gen.float.fromgen.float.from(fromValue :: ANY) :: FLOAT

Deterministically generate a random float from the provided input.

gen.float.from(fromValue :: ANY, withSize :: INTEGER) :: FLOAT

Deterministically generate a random float from the provided input.

gen.integer.fromgen.integer.from(fromValue :: ANY) :: INTEGER

Deterministically generate a random integer from the provided input.

gen.integer.from(fromValue :: ANY, withSize :: INTEGER) :: INTEGER

Deterministically generate a random integer from the provided input.

gen.node.fromgen.node.from(fromValue :: ANY) :: NODE

Deterministically generate a random node from the provided input.

gen.node.from(fromValue :: ANY, withSize :: INTEGER) :: NODE

Deterministically generate a random node from the provided input.

gen.string.fromgen.string.from(fromValue :: ANY) :: STRING

Deterministically generate a random string from the provided input.

gen.string.from(fromValue :: ANY, withSize :: INTEGER) :: STRING

Deterministically generate a random string from the provided input.

getHostgetHost(node :: NODE) :: INTEGER

Compute which host a node should be assigned to (null if unknown without contacting the graph)

getHost(nodeIdStr :: STRING) :: INTEGER

Compute which host a node ID (string representation) should be assigned to (null if unknown without contacting the graph)

getHost(nodeIdBytes :: BYTES) :: INTEGER

Compute which host a node ID (bytes representation) should be assigned to (null if unknown without contacting the graph)

hashhash() :: INTEGER

Hashes the input arguments

hash(input0 :: ANY) :: INTEGER

Hashes the input arguments

hash(input0 :: ANY, input1 :: ANY) :: INTEGER

Hashes the input arguments

hash(input0 :: ANY, input1 :: ANY, input2 :: ANY) :: INTEGER

Hashes the input arguments

hash(input0 :: ANY, input1 :: ANY, input2 :: ANY, input3 :: ANY) :: INTEGER

Hashes the input arguments

hash(input0 :: ANY, input1 :: ANY, input2 :: ANY, input3 :: ANY, input4 :: ANY) :: INTEGER

Hashes the input arguments

hash(input0 :: ANY, input1 :: ANY, input2 :: ANY, input3 :: ANY, input4 :: ANY, input5 :: ANY) :: INTEGER

Hashes the input arguments

hash(input0 :: ANY, input1 :: ANY, input2 :: ANY, input3 :: ANY, input4 :: ANY, input5 :: ANY, input6 :: ANY) :: INTEGER

Hashes the input arguments

hash(input0 :: ANY, input1 :: ANY, input2 :: ANY, input3 :: ANY, input4 :: ANY, input5 :: ANY, input6 :: ANY, input7 :: ANY) :: INTEGER

Hashes the input arguments

hash(input0 :: ANY, input1 :: ANY, input2 :: ANY, input3 :: ANY, input4 :: ANY, input5 :: ANY, input6 :: ANY, input7 :: ANY, input8 :: ANY) :: INTEGER

Hashes the input arguments

hash(input0 :: ANY, input1 :: ANY, input2 :: ANY, input3 :: ANY, input4 :: ANY, input5 :: ANY, input6 :: ANY, input7 :: ANY, input8 :: ANY, input9 :: ANY) :: INTEGER

Hashes the input arguments

hash(input0 :: ANY, input1 :: ANY, input2 :: ANY, input3 :: ANY, input4 :: ANY, input5 :: ANY, input6 :: ANY, input7 :: ANY, input8 :: ANY, input9 :: ANY, input10 :: ANY) :: INTEGER

Hashes the input arguments

hash(input0 :: ANY, input1 :: ANY, input2 :: ANY, input3 :: ANY, input4 :: ANY, input5 :: ANY, input6 :: ANY, input7 :: ANY, input8 :: ANY, input9 :: ANY, input10 :: ANY, input11 :: ANY) :: INTEGER

Hashes the input arguments

hash(input0 :: ANY, input1 :: ANY, input2 :: ANY, input3 :: ANY, input4 :: ANY, input5 :: ANY, input6 :: ANY, input7 :: ANY, input8 :: ANY, input9 :: ANY, input10 :: ANY, input11 :: ANY, input12 :: ANY) :: INTEGER

Hashes the input arguments

hash(input0 :: ANY, input1 :: ANY, input2 :: ANY, input3 :: ANY, input4 :: ANY, input5 :: ANY, input6 :: ANY, input7 :: ANY, input8 :: ANY, input9 :: ANY, input10 :: ANY, input11 :: ANY, input12 :: ANY, input13 :: ANY) :: INTEGER

Hashes the input arguments

hash(input0 :: ANY, input1 :: ANY, input2 :: ANY, input3 :: ANY, input4 :: ANY, input5 :: ANY, input6 :: ANY, input7 :: ANY, input8 :: ANY, input9 :: ANY, input10 :: ANY, input11 :: ANY, input12 :: ANY, input13 :: ANY, input14 :: ANY) :: INTEGER

Hashes the input arguments

idFromidFrom(input0 :: ANY) :: ANY

Hashes the input arguments into a valid ID

idFrom(input0 :: ANY, input1 :: ANY) :: ANY

Hashes the input arguments into a valid ID

idFrom(input0 :: ANY, input1 :: ANY, input2 :: ANY) :: ANY

Hashes the input arguments into a valid ID

idFrom(input0 :: ANY, input1 :: ANY, input2 :: ANY, input3 :: ANY) :: ANY

Hashes the input arguments into a valid ID

idFrom(input0 :: ANY, input1 :: ANY, input2 :: ANY, input3 :: ANY, input4 :: ANY) :: ANY

Hashes the input arguments into a valid ID

idFrom(input0 :: ANY, input1 :: ANY, input2 :: ANY, input3 :: ANY, input4 :: ANY, input5 :: ANY) :: ANY

Hashes the input arguments into a valid ID

idFrom(input0 :: ANY, input1 :: ANY, input2 :: ANY, input3 :: ANY, input4 :: ANY, input5 :: ANY, input6 :: ANY) :: ANY

Hashes the input arguments into a valid ID

idFrom(input0 :: ANY, input1 :: ANY, input2 :: ANY, input3 :: ANY, input4 :: ANY, input5 :: ANY, input6 :: ANY, input7 :: ANY) :: ANY

Hashes the input arguments into a valid ID

idFrom(input0 :: ANY, input1 :: ANY, input2 :: ANY, input3 :: ANY, input4 :: ANY, input5 :: ANY, input6 :: ANY, input7 :: ANY, input8 :: ANY) :: ANY

Hashes the input arguments into a valid ID

idFrom(input0 :: ANY, input1 :: ANY, input2 :: ANY, input3 :: ANY, input4 :: ANY, input5 :: ANY, input6 :: ANY, input7 :: ANY, input8 :: ANY, input9 :: ANY) :: ANY

Hashes the input arguments into a valid ID

idFrom(input0 :: ANY, input1 :: ANY, input2 :: ANY, input3 :: ANY, input4 :: ANY, input5 :: ANY, input6 :: ANY, input7 :: ANY, input8 :: ANY, input9 :: ANY, input10 :: ANY) :: ANY

Hashes the input arguments into a valid ID

idFrom(input0 :: ANY, input1 :: ANY, input2 :: ANY, input3 :: ANY, input4 :: ANY, input5 :: ANY, input6 :: ANY, input7 :: ANY, input8 :: ANY, input9 :: ANY, input10 :: ANY, input11 :: ANY) :: ANY

Hashes the input arguments into a valid ID

idFrom(input0 :: ANY, input1 :: ANY, input2 :: ANY, input3 :: ANY, input4 :: ANY, input5 :: ANY, input6 :: ANY, input7 :: ANY, input8 :: ANY, input9 :: ANY, input10 :: ANY, input11 :: ANY, input12 :: ANY) :: ANY

Hashes the input arguments into a valid ID

idFrom(input0 :: ANY, input1 :: ANY, input2 :: ANY, input3 :: ANY, input4 :: ANY, input5 :: ANY, input6 :: ANY, input7 :: ANY, input8 :: ANY, input9 :: ANY, input10 :: ANY, input11 :: ANY, input12 :: ANY, input13 :: ANY) :: ANY

Hashes the input arguments into a valid ID

idFrom(input0 :: ANY, input1 :: ANY, input2 :: ANY, input3 :: ANY, input4 :: ANY, input5 :: ANY, input6 :: ANY, input7 :: ANY, input8 :: ANY, input9 :: ANY, input10 :: ANY, input11 :: ANY, input12 :: ANY, input13 :: ANY, input14 :: ANY) :: ANY

Hashes the input arguments into a valid ID

idFrom(input0 :: ANY, input1 :: ANY, input2 :: ANY, input3 :: ANY, input4 :: ANY, input5 :: ANY, input6 :: ANY, input7 :: ANY, input8 :: ANY, input9 :: ANY, input10 :: ANY, input11 :: ANY, input12 :: ANY, input13 :: ANY, input14 :: ANY, input15 :: ANY) :: ANY

Hashes the input arguments into a valid ID

kafkaHashkafkaHash(partitionKey :: STRING) :: INTEGER

Hashes a string to a (32-bit) integer using the same algorithm Apache Kafka uses for its DefaultPartitioner

kafkaHash(partitionKey :: BYTES) :: INTEGER

Hashes a bytes value to a (32-bit) integer using the same algorithm Apache Kafka uses for its DefaultPartitioner

locIdFromlocIdFrom(positionIdx :: INTEGER, input0 :: ANY) :: ANY

Generates a consistent (based on a hash of the arguments) ID. The ID created will be managed by the cluster member whose position corresponds to the provided position index given the cluster topology.

locIdFrom(positionIdx :: INTEGER, input0 :: ANY, input1 :: ANY) :: ANY

Generates a consistent (based on a hash of the arguments) ID. The ID created will be managed by the cluster member whose position corresponds to the provided position index given the cluster topology.

locIdFrom(positionIdx :: INTEGER, input0 :: ANY, input1 :: ANY, input2 :: ANY) :: ANY

Generates a consistent (based on a hash of the arguments) ID. The ID created will be managed by the cluster member whose position corresponds to the provided position index given the cluster topology.

locIdFrom(positionIdx :: INTEGER, input0 :: ANY, input1 :: ANY, input2 :: ANY, input3 :: ANY) :: ANY

Generates a consistent (based on a hash of the arguments) ID. The ID created will be managed by the cluster member whose position corresponds to the provided position index given the cluster topology.

locIdFrom(positionIdx :: INTEGER, input0 :: ANY, input1 :: ANY, input2 :: ANY, input3 :: ANY, input4 :: ANY) :: ANY

Generates a consistent (based on a hash of the arguments) ID. The ID created will be managed by the cluster member whose position corresponds to the provided position index given the cluster topology.

locIdFrom(positionIdx :: INTEGER, input0 :: ANY, input1 :: ANY, input2 :: ANY, input3 :: ANY, input4 :: ANY, input5 :: ANY) :: ANY

Generates a consistent (based on a hash of the arguments) ID. The ID created will be managed by the cluster member whose position corresponds to the provided position index given the cluster topology.

locIdFrom(positionIdx :: INTEGER, input0 :: ANY, input1 :: ANY, input2 :: ANY, input3 :: ANY, input4 :: ANY, input5 :: ANY, input6 :: ANY) :: ANY

Generates a consistent (based on a hash of the arguments) ID. The ID created will be managed by the cluster member whose position corresponds to the provided position index given the cluster topology.

locIdFrom(positionIdx :: INTEGER, input0 :: ANY, input1 :: ANY, input2 :: ANY, input3 :: ANY, input4 :: ANY, input5 :: ANY, input6 :: ANY, input7 :: ANY) :: ANY

Generates a consistent (based on a hash of the arguments) ID. The ID created will be managed by the cluster member whose position corresponds to the provided position index given the cluster topology.

locIdFrom(positionIdx :: INTEGER, input0 :: ANY, input1 :: ANY, input2 :: ANY, input3 :: ANY, input4 :: ANY, input5 :: ANY, input6 :: ANY, input7 :: ANY, input8 :: ANY) :: ANY

Generates a consistent (based on a hash of the arguments) ID. The ID created will be managed by the cluster member whose position corresponds to the provided position index given the cluster topology.

locIdFrom(positionIdx :: INTEGER, input0 :: ANY, input1 :: ANY, input2 :: ANY, input3 :: ANY, input4 :: ANY, input5 :: ANY, input6 :: ANY, input7 :: ANY, input8 :: ANY, input9 :: ANY) :: ANY

Generates a consistent (based on a hash of the arguments) ID. The ID created will be managed by the cluster member whose position corresponds to the provided position index given the cluster topology.

locIdFrom(positionIdx :: INTEGER, input0 :: ANY, input1 :: ANY, input2 :: ANY, input3 :: ANY, input4 :: ANY, input5 :: ANY, input6 :: ANY, input7 :: ANY, input8 :: ANY, input9 :: ANY, input10 :: ANY) :: ANY

Generates a consistent (based on a hash of the arguments) ID. The ID created will be managed by the cluster member whose position corresponds to the provided position index given the cluster topology.

locIdFrom(positionIdx :: INTEGER, input0 :: ANY, input1 :: ANY, input2 :: ANY, input3 :: ANY, input4 :: ANY, input5 :: ANY, input6 :: ANY, input7 :: ANY, input8 :: ANY, input9 :: ANY, input10 :: ANY, input11 :: ANY) :: ANY

Generates a consistent (based on a hash of the arguments) ID. The ID created will be managed by the cluster member whose position corresponds to the provided position index given the cluster topology.

locIdFrom(positionIdx :: INTEGER, input0 :: ANY, input1 :: ANY, input2 :: ANY, input3 :: ANY, input4 :: ANY, input5 :: ANY, input6 :: ANY, input7 :: ANY, input8 :: ANY, input9 :: ANY, input10 :: ANY, input11 :: ANY, input12 :: ANY) :: ANY

Generates a consistent (based on a hash of the arguments) ID. The ID created will be managed by the cluster member whose position corresponds to the provided position index given the cluster topology.

locIdFrom(positionIdx :: INTEGER, input0 :: ANY, input1 :: ANY, input2 :: ANY, input3 :: ANY, input4 :: ANY, input5 :: ANY, input6 :: ANY, input7 :: ANY, input8 :: ANY, input9 :: ANY, input10 :: ANY, input11 :: ANY, input12 :: ANY, input13 :: ANY) :: ANY

Generates a consistent (based on a hash of the arguments) ID. The ID created will be managed by the cluster member whose position corresponds to the provided position index given the cluster topology.

locIdFrom(positionIdx :: INTEGER, input0 :: ANY, input1 :: ANY, input2 :: ANY, input3 :: ANY, input4 :: ANY, input5 :: ANY, input6 :: ANY, input7 :: ANY, input8 :: ANY, input9 :: ANY, input10 :: ANY, input11 :: ANY, input12 :: ANY, input13 :: ANY, input14 :: ANY) :: ANY

Generates a consistent (based on a hash of the arguments) ID. The ID created will be managed by the cluster member whose position corresponds to the provided position index given the cluster topology.

localdatetimelocaldatetime() :: LOCALDATETIME

Get the current local date time

localdatetime(options :: MAP) :: LOCALDATETIME

Construct a local date time from the options

localdatetime(datetime :: STRING) :: LOCALDATETIME

Parse a local date time from a string

localdatetime(datetime :: STRING, format :: STRING) :: LOCALDATETIME

Parse a local date time from a string using a custom format

localtimelocaltime() :: LOCALTIME

Get the current local time

localtime(options :: MAP) :: LOCALTIME

Construct a local time from the options

localtime(time :: STRING) :: LOCALTIME

Parse a local time from a string

localtime(time :: STRING, format :: STRING) :: LOCALTIME

Parse a local time from a string using a custom format

map.dropNullValuesmap.dropNullValues(argument :: MAP) :: MAP

Keep only non-null from the map

map.fromPairsmap.fromPairs(entries :: LIST OF LIST OF ANY) :: MAP

Construct a map from a list of [key,value] entries

map.mergemap.merge(first :: MAP, second :: MAP) :: MAP

Merge two maps

map.removeKeymap.removeKey(map :: MAP, key :: STRING) :: MAP

remove the key from the map

map.sortedPropertiesmap.sortedProperties(map :: MAP) :: LIST OF LIST OF ANY

Extract from a map a list of [key,value] entries sorted by the key

meta.typemeta.type(value :: ANY) :: STRING

Inspect the (name of the) type of a value

parseJsonparseJson(jsonStr :: STRING) :: ANY

Parses jsonStr to a Cypher value

quineIdquineId(input :: STRING) :: BYTES

Returns the Quine ID corresponding to the string

strIdstrId(input :: NODE) :: STRING

Returns a string representation of the node’s ID

temporal.formattemporal.format(date :: DATETIME, format :: STRING) :: STRING

Convert date time into string

temporal.format(date :: LOCALDATETIME, format :: STRING) :: STRING

Convert local date time into string

text.regexFirstMatchtext.regexFirstMatch(text :: STRING, regex :: STRING) :: LIST OF STRING

Parses the string text using the regular expression regex and returns the first set of capture group matches

text.splittext.split(text :: STRING, regex :: STRING) :: LIST OF STRING

Splits the string around matches of the regex

text.split(text :: STRING, regex :: STRING, limit :: INTEGER) :: LIST OF STRING

Splits the string around the first limit matches of the regex

text.urldecodetext.urldecode(text :: STRING) :: LIST OF STRING

URL-decodes (x-www-form-urlencoded) the provided string

text.urldecode(text :: STRING, decodePlusAsSpace :: BOOLEAN) :: LIST OF STRING

URL-decodes the provided string, using RFC3986 if decodePlusAsSpace = false

text.urlencodetext.urlencode(text :: STRING) :: LIST OF STRING

URL-encodes the provided string; additionally percent-encoding quotes, angle brackets, and curly braces

text.urlencode(text :: STRING, usePlusForSpace :: BOOLEAN) :: LIST OF STRING

URL-encodes the provided string; additionally percent-encoding quotes, angle brackets, and curly braces; optionally using + for spaces instead of %20

text.urlencode(text :: STRING, encodeExtraChars :: STRING) :: LIST OF STRING

URL-encodes the provided string, additionally percent-encoding the characters enumerated in encodeExtraChars

text.urlencode(text :: STRING, usePlusForSpace :: BOOLEAN, encodeExtraChars :: STRING) :: LIST OF STRING

URL-encodes the provided string, additionally percent-encoding the characters enumerated in encodeExtraChars, optionally using + for spaces instead of %20

text.utf8Decodetext.utf8Decode(bytes :: BYTES) :: STRING

Returns the bytes decoded as a UTF-8 String

text.utf8Encodetext.utf8Encode(string :: STRING) :: BYTES

Returns the string encoded as UTF-8 bytes

timetime() :: TIME

Get the current local time

time(options :: MAP) :: TIME

Construct a local time from the options

time(time :: STRING) :: TIME

Parse a local time from a string

time(time :: STRING, format :: STRING) :: TIME

Parse a local time from a string using a custom format

toJsontoJson(x :: ANY) :: STRING

Returns x encoded as a JSON string

User-defined Cypher procedures

These are the default procedures that come with Quine Enterprise. More user defined procedures can be added by following these instructions.

NameSignatureDescriptionMode
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
getHostgetHost(node :: NODE) :: (host :: INTEGER)

Compute which host a node is currently located on

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 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