Show functions

Showing the available functions can be done with SHOW FUNCTIONS. For general information about the SHOW command, see the SHOW page.

Syntax

For full details about the syntax descriptions, see the Operations Manual → Administration command syntax.

Action Syntax

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

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

Show functions that a 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]]

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

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

Examples

Show all functions

To show all functions with the default output columns, use the SHOW FUNCTIONS command. If all columns are required, use SHOW FUNCTIONS YIELD *.

Show all functions and return default columns
SHOW FUNCTIONS
Show all functions and return all columns
SHOW FUNCTIONS YIELD *

Return specific columns

It is possible to return specific columns of the available functions using the YIELD clause:

Show all functions and return specific columns only
SHOW FUNCTIONS YIELD name, signature

Show functions with filtering

The SHOW FUNCTIONS command can be filtered using the WHERE clause.

Filter SHOW FUNCTIONS using WHERE
SHOW FUNCTIONS YIELD name
WHERE name CONTAINS 'vector'
RETURN count(name) AS numVectorFunctions

SHOW FUNCTIONS can also be filtered with the BUILT IN and USER DEFINED keywords.

Filter SHOW FUNCTIONS using WHERE and the BUILT IN keyword
SHOW BUILT IN FUNCTIONS YIELD name, isBuiltIn
WHERE name STARTS WITH 'a'

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:

Show all functions executable by the current user
SHOW FUNCTIONS EXECUTABLE BY CURRENT USER YIELD name, category, description, rolesExecution, rolesBoostedExecution
LIMIT 5
Result
name category description rolesExecution rolesBoostedExecution

"abs"

"Numeric"

"Returns the absolute value of an INTEGER or 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>

"allReduce"

"Predicate"

"Evaluates expression against each element of LIST<ANY>, with the result stored in accumulator. Returns true if predicate holds for each iteration of accumulator."

<null>

<null>

"any"

"Predicate"

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

<null>

<null>

Rows: 5

Notice that the two roles columns are empty due to missing the SHOW ROLE privilege.

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

Show all functions executable by a specific user
SHOW FUNCTIONS EXECUTABLE BY jake

Combine SHOW FUNCTIONS with other Cypher clauses

SHOW FUNCTIONS can be combined with other Cypher® clauses to form a single query.

When combining SHOW FUNCTIONS with other clauses, the YIELD clause is mandatory and must not be omitted. YIELD must explicitly list the yielded columns. YIELD * is not permitted. The query must also end with a valid last clause (like a RETURN or an updating clause).

Return all functions with more than one signature
SHOW FUNCTIONS
YIELD name, signature
WITH name, collect(signature) AS signatures
FILTER size(signatures) > 1
RETURN name, signatures

Return columns

SHOW FUNCTIONS will produce a table with the following columns:

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

BOOLEAN

deprecatedBy

The replacement function to use in case of deprecation; otherwise null.

STRING