SHOW FUNCTIONS
Listing the available functions can be done with SHOW FUNCTIONS
.
The command |
The SHOW FUNCTIONS
command will produce a table with the following columns:
Column | Description | Type |
---|---|---|
|
The name of the function. Default Output |
|
|
The function category, for example |
|
|
The function description. Default Output |
|
|
The signature of the function. |
|
|
Whether the function is built-in or user-defined. |
|
|
List of the arguments for the function, as map of strings and booleans with |
|
|
The return value type. |
|
|
Whether the function is aggregating or not. |
|
|
List of roles permitted to execute this function.
Is |
|
|
List of roles permitted to use boosted mode when executing this function.
Is |
|
|
Whether the function is deprecated. Introduced in 5.9 |
|
|
The replacement function to use in case of deprecation; otherwise |
|
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 |
- 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 |
- 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 |
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 *
.
SHOW FUNCTIONS
name | category | description |
---|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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':
SHOW BUILT IN FUNCTIONS YIELD name, isBuiltIn
WHERE name STARTS WITH 'a'
name | isBuiltIn |
---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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:
SHOW FUNCTIONS EXECUTABLE BY CURRENT USER YIELD *
name | category | description | rolesExecution | rolesBoostedExecution | … |
---|---|---|---|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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
-
deprecatedBy
The second option, is to filter for a specific user:
SHOW FUNCTIONS EXECUTABLE BY jake
name | category | description |
---|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Rows: 10 |