Cypher builtin functions
| Name | Signature | Description |
|---|---|---|
abs | abs(NUMBER?) :: NUMBER? | absolute value of a number |
acos | acos(NUMBER?) :: FLOAT? | arcosine (in radians) of a number |
asin | asin(NUMBER?) :: FLOAT? | arcsine (in radians) of a number |
atan | atan(NUMBER?) :: FLOAT? | arctangent (in radians) of a number |
atan2 | atan2(NUMBER?, NUMBER?) :: FLOAT? | arctangent (in radians) of the quotient of its arguments |
ceil | ceil(NUMBER?) :: FLOAT? | smallest integer greater than or equal to the input |
coalesce | coalesce(ANY?, ..) :: ANY? | returns the first non- |
cos | cos(NUMBER?) :: FLOAT? | cosine of a number of radians |
cot | cot(NUMBER?) :: FLOAT? | cotangent of a number of radians |
degrees | degrees(NUMBER?) :: FLOAT? | convert radians to degrees |
e | e() :: FLOAT? | mathematical constant |
exp | exp(NUMBER?) :: FLOAT? | return the mathematical constant |
floor | floor(NUMBER?) :: FLOAT? | largest integer less than or equal to the input |
haversin | haversin(NUMBER?) :: FLOAT? | half the versine of a number |
head | head(LIST? OF ANY?) :: ANY? | extract the first element of a list |
id | id(NODE?) :: ANY? | extract the ID of a node |
keys | keys(ANY?) :: LIST? OF STRING? | extract the keys from a map, node, or relationship |
lTrim | lTrim(STRING?) :: STRING? | original string with leading whitespace removed |
labels | labels(ANY?) :: LIST? OF STRING? | extract the labels of a node or relationship |
last | last(LIST? OF ANY?) :: ANY? | extract the last element of a list |
left | left(STRING?, INTEGER?) :: STRING? | string containing the specified number of leftmost characters of the original string |
length | length(PATH?) :: INTEGER? | length of a path (ie. the number of relationships in it) |
log | log(NUMBER?) :: FLOAT? | natural logarithm of a number |
log10 | log10(NUMBER?) :: FLOAT? | common logarithm (base 10) of a number |
nodes | nodes(PATH?) :: LIST? OF NODE? | extract a list of nodes in a path |
pi | pi() :: FLOAT? | mathematical constant |
properties | properties(ANY?) :: MAP? | extract the properties from a map, node, or relationship |
rTrim | rTrim(STRING?) :: STRING? | original string with trailing whitespace removed |
radians | radians(NUMBER?) :: FLOAT? | convert degrees to radians |
rand | rand() :: FLOAT? | random float between 0 (inclusive) and 1 (exclusive) |
range | range(start :: INTEGER, end :: INTEGER, step :: INTEGER?) :: LIST? OF INTEGER? | construct a list of integers representing a range |
relationships | relationships(PATH?) :: LIST? OF RELATIONSHIP? | extract a list of relationships in a path |
replace | replace(original :: STRING?, target :: STRING?, replacement :: STRING?) :: STRING? | replace every occurrence of a target string |
reverse | reverse(ANY?) :: ANY? | reverse a string or list |
right | right(STRING?, INTEGER?) :: STRING? | string containing the specified number of rightmost characters of the original string |
round | round(input :: NUMBER?, precision :: INTEGER?, mode :: STRING?) :: FLOAT? | nearest number to the input |
sign | sign(NUMBER?) :: INTEGER? | signum of a number |
sin | sin(NUMBER?) :: FLOAT? | sine of a number of radians |
size | size(ANY?) :: INTEGER? | number of elements in a list or characters in a string |
split | split(input :: STRING?, delimiter :: STRING?) :: LIST? OF STRING? | split a string on every instance of a delimiter |
sqrt | sqrt(NUMBER?) :: FLOAT? | square root of a number |
substring | substring(original :: STRING?, start :: INTEGER? [, end :: INTEGER? ]) :: STRING? | substring of the original string, beginning with a 0-based index start and length |
tail | tail(LIST? OF ANY?) :: LIST? OF ANY? | return the list without its first element |
tan | tan(NUMBER?) :: FLOAT? | tangent of a number of radians |
timestamp | timestamp() :: INTEGER? | number of milliseconds elapsed since midnight, January 1, 1970 UTC |
toBoolean | toBoolean(STRING?) :: BOOLEAN? | convert a string into a boolean |
toFloat | toFloat(ANY?) :: FLOAT? | convert a string or integer into a float |
toInteger | toInteger(ANY?) :: INTEGER? | convert a string or float into an integer |
toLower | toLower(STRING?) :: STRING? | convert a string to lowercase |
toString | toString(ANY?) :: STRING? | convert a value to a string |
toUpper | toUpper(STRING?) :: STRING? | convert a string to uppercase |
trim | trim(STRING?) :: STRING? | removing leading and trailing whitespace from a string |
type | type(RELATIONSHIP?) :: STRING? | return the name of a relationship |