SHOW PROCEDURES
Listing the available procedures can be done with SHOW PROCEDURES
.
The command |
This command will produce a table with the following columns:
Column | Description | Type |
---|---|---|
|
The name of the procedure. Default Output |
|
|
The procedure description. Default Output |
|
|
The procedure mode, for example |
|
|
Whether the procedure can be run on the |
|
|
The signature of the procedure. |
|
|
List of the arguments for the procedure, as map of strings and booleans with |
|
|
List of the returned values for the procedure, as map of strings and booleans with |
|
|
|
|
|
List of roles permitted to execute this procedure.
Is |
|
|
List of roles permitted to use boosted mode when executing this procedure.
Is |
|
|
Whether the procedure is deprecated. Introduced in 5.9 |
|
|
The replacement procedure to use in case of deprecation; otherwise |
|
|
Map of extra output, e.g. if the procedure is deprecated. |
|
The deprecation information for procedures is returned both in the isDeprecated
and option
columns.
Syntax
More details about the syntax descriptions can be found here. |
- List all procedures
SHOW PROCEDURE[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 procedures that the current user can execute
SHOW PROCEDURE[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 procedures that the specified user can execute
SHOW PROCEDURE[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 privilege SHOW USER
.
This command cannot be used for LDAP users.
When using the |
Listing all procedures
To list all available procedures with the default output columns, the SHOW PROCEDURES
command can be used.
If all columns are required, use SHOW PROCEDURES YIELD *
.
SHOW PROCEDURES
name | description | mode | worksOnSystem |
---|---|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Rows: 15 |
The above table only displays the first 15 results of the query. For a full list of all built-in procedures in Neo4j, visit the Operations Manual → List of procedures.
Listing procedures with filtering on output columns
The listed procedures can be filtered in multiple ways, one way is to use the WHERE
clause.
For example, returning the names of all admin
procedures:
SHOW PROCEDURES YIELD name, admin
WHERE admin
name | admin |
---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Rows: 15 |
The above table only displays the first 15 results of the query.
For a full list of all procedures which require admin
privileges in Neo4j, visit the /docs/operations-manual/5/reference/procedures#/#_list_of_procedures[Operations Manual → List of procedures].
Listing procedures with other filtering
The listed procedures can also be filtered by 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 for using the EXECUTABLE
clause.
The first option is to filter for the current user:
SHOW PROCEDURES EXECUTABLE BY CURRENT USER YIELD *
name | description | rolesExecution | rolesBoostedExecution | … |
---|---|---|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Rows: 15 |
The above table only displays the first 15 results of the query.
Note 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:
-
mode
-
worksOnSystem
-
signature
-
argumentDescription
-
returnDescription
-
admin
-
isDeprecated
-
deprecatedBy
-
options
The second option for using the EXECUTABLE
clause is to filter the list to only contain procedures executable by a specific user.
The below example shows the procedures available to the user jake
, who has been granted the EXECUTE PROCEDURE dbms.*
privilege by the admin
of the database.
(More information about DBMS EXECUTE
privilege administration can be found in the Operations Manual → The DBMS EXECUTE
privileges).
SHOW PROCEDURES EXECUTABLE BY jake
name | description | mode | worksOnSystem |
---|---|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Rows: 13 |