SHOW FUNCTIONS

Listing the available functions can be done with SHOW FUNCTIONS.

The command SHOW FUNCTIONS returns only the default output. For a full output use the optional YIELD command. Full output: SHOW FUNCTIONS YIELD *.

The SHOW FUNCTIONS command will produce a table with the following columns:

Table 1. List functions output
Column Description Type

name

The name of the function. Default Output

STRING

category

The function category, for example scalar or string. Default Output

STRING

description

The function description. Default Output

STRING

signature

The signature of the function.

STRING

isBuiltIn

Whether the function is built-in or user-defined.

BOOLEAN

argumentDescription

List of the arguments for the function, as map of strings and booleans with name, type, default, isDeprecated, and description.

LIST<MAP>

returnDescription

The return value type.

STRING

aggregating

Whether the function is aggregating or not.

BOOLEAN

rolesExecution

List of roles permitted to execute this function. Is null without the SHOW ROLE privilege.

LIST<STRING>

rolesBoostedExecution

List of roles permitted to use boosted mode when executing this function. Is null without the SHOW ROLE privilege.

LIST<STRING>

isDeprecated

Whether the function is deprecated. Introduced in 5.9

BOOLEAN

Syntax

More details about the syntax descriptions can be found here.

List functions, either all or only built-in or user-defined
SHOW [ALL|BUILT IN|USER DEFINED] FUNCTION[S]
[YIELD { * | field[, ...] } [ORDER BY field[, ...]] [SKIP n] [LIMIT n]]
[WHERE expression]
[RETURN field[, ...] [ORDER BY field[, ...]] [SKIP n] [LIMIT n]]

When using the RETURN clause, the YIELD clause is mandatory and must not be omitted.

List functions that the current user can execute
SHOW [ALL|BUILT IN|USER DEFINED] FUNCTION[S] EXECUTABLE [BY CURRENT USER]
[YIELD { * | field[, ...] } [ORDER BY field[, ...]] [SKIP n] [LIMIT n]]
[WHERE expression]
[RETURN field[, ...] [ORDER BY field[, ...]] [SKIP n] [LIMIT n]]

When using the RETURN clause, the YIELD clause is mandatory and must not be omitted.

List functions that the specified user can execute
SHOW [ALL|BUILT IN|USER DEFINED] FUNCTION[S] EXECUTABLE BY username
[YIELD { * | field[, ...] } [ORDER BY field[, ...]] [SKIP n] [LIMIT n]]
[WHERE expression]
[RETURN field[, ...] [ORDER BY field[, ...]] [SKIP n] [LIMIT n]]

Required privilege SHOW USER. This command cannot be used for LDAP users.

When using the RETURN clause, the YIELD clause is mandatory and must not be omitted.

Listing all functions

To list all available functions with the default output columns, the SHOW FUNCTIONS command can be used. If all columns are required, use SHOW FUNCTIONS YIELD *.

Query
SHOW FUNCTIONS
Table 2. Result
name category description

"abs"

"Numeric"

"Returns the absolute value of an INTEGER."

"abs"

"Numeric"

"Returns the absolute value of a FLOAT."

"acos"

"Trigonometric"

"Returns the arccosine of a FLOAT in radians."

"all"

"Predicate"

"Returns true if the predicate holds for all elements in the given LIST<ANY>."

"any"

"Predicate"

"Returns true if the predicate holds for at least one element in the given LIST<ANY>."

"asin"

"Trigonometric"

"Returns the arcsine of a FLOAT in radians."

"atan"

"Trigonometric"

"Returns the arctangent of a FLOAT in radians."

"atan2"

"Trigonometric"

"Returns the arctangent2 of a set of coordinates in radians."

"avg"

"Aggregating"

"Returns the average of a set of INTEGER values."

"avg"

"Aggregating"

"Returns the average of a set of FLOAT values."

"avg"

"Aggregating"

"Returns the average of a set of DURATION values."

"ceil"

"Numeric"

"Returns the smallest FLOAT that is greater than or equal to a number and equal to an INTEGER."

"coalesce"

"Scalar"

"Returns the first non-null value in a list of expressions."

"collect"

"Aggregating"

"Returns a list containing the values returned by an expression."

"cos"

"Trigonometric"

"Returns the cosine of a FLOAT."

"cot"

"Trigonometric"

"Returns the cotangent of a FLOAT."

"count"

"Aggregating"

"Returns the number of values or rows."

"date"

"Temporal"

"Creates a DATE instant."

"date.realtime"

"Temporal"

"Returns the current DATE instant using the realtime clock."

"date.statement"

"Temporal"

"Returns the current DATE instant using the statement clock."

Rows: 20

The above table only displays the first 20 results of the query. For a full list of all available functions in Cypher®, see the chapter on Functions.

Listing functions with filtering on output columns

The listed functions can be filtered in multiple ways. One way is through the type keywords, BUILT IN and USER DEFINED. A more flexible way is to use the WHERE clause. For example, getting the name of all built-in functions starting with the letter 'a':

Query
SHOW BUILT IN FUNCTIONS YIELD name, isBuiltIn
WHERE name STARTS WITH 'a'
Table 3. Result
name isBuiltIn

"abs"

true

"abs"

true

"acos"

true

"all"

true

"any"

true

"asin"

true

"atan"

true

"atan2"

true

"avg"

true

"avg"

true

"avg"

true

Rows: 11

Listing functions with other filtering

The listed functions can also be filtered on whether a user can execute them. This filtering is only available through the EXECUTABLE clause and not through the WHERE clause. This is due to using the user’s privileges instead of filtering on the available output columns.

There are two options, how to use the EXECUTABLE clause. The first option, is to filter for the current user:

Query
SHOW FUNCTIONS EXECUTABLE BY CURRENT USER YIELD *
Table 4. Result
name category description rolesExecution rolesBoostedExecution …​

"abs"

"Numeric"

"Returns the absolute value of an INTEGER."

<null>

<null>

"abs"

"Numeric"

"Returns the absolute value of a FLOAT."

<null>

<null>

"acos"

"Trigonometric"

"Returns the arccosine of a FLOAT in radians."

<null>

<null>

"all"

"Predicate"

"Returns true if the predicate holds for all elements in the given LIST<ANY>."

<null>

<null>

"any"

"Predicate"

"Returns true if the predicate holds for at least one element in the given LIST<ANY>."

<null>

<null>

"asin"

"Trigonometric"

"Returns the arcsine of a FLOAT in radians."

<null>

<null>

"atan"

"Trigonometric"

"Returns the arctangent of a FLOAT in radians."

<null>

<null>

"atan2"

"Trigonometric"

"Returns the arctangent2 of a set of coordinates in radians."

<null>

<null>

"avg"

"Aggregating"

"Returns the average of a set of INTEGER values."

<null>

<null>

"avg"

"Aggregating"

"Returns the average of a set of FLOAT values."

<null>

<null>

Rows: 10

Notice that the two roles columns are empty due to missing the SHOW ROLE privilege. Also note that the following columns are not present in the table:

  • signature

  • isBuiltIn

  • argumentDescription

  • returnDescription

  • aggregating

  • isDeprecated

The second option, is to filter for a specific user:

Query
SHOW FUNCTIONS EXECUTABLE BY jake
Table 5. Result
name category description

"abs"

"Numeric"

"Returns the absolute value of an INTEGER."

"abs"

"Numeric"

"Returns the absolute value of a FLOAT."

"acos"

"Trigonometric"

"Returns the arccosine of a FLOAT in radians."

"all"

"Predicate"

"Returns true if the predicate holds for all elements in the given LIST<ANY>."

"any"

"Predicate"

"Returns true if the predicate holds for at least one element in the given LIST<ANY>."

"asin"

"Trigonometric"

"Returns the arcsine of a FLOAT in radians."

"atan"

"Trigonometric"

"Returns the arctangent of a FLOAT in radians."

"atan2"

"Trigonometric"

"Returns the arctangent2 of a set of coordinates in radians."

"avg"

"Aggregating"

"Returns the average of a set of INTEGER values."

"avg"

"Aggregating"

"Returns the average of a set of FLOAT values."

Rows: 10