SHOW PROCEDURES

This section explains the SHOW PROCEDURES command.

Listing the available procedures can be done with SHOW PROCEDURES.

The command SHOW PROCEDURES only outputs the default output; for a full output use the optional YIELD command. Full output: SHOW PROCEDURES YIELD *.

This command will produce a table with the following columns:

Table 1. List procedures output
Column Description

name

The name of the procedure. Default Output

description

The procedure description. Default Output

mode

The procedure mode, for example READ or WRITE. Default Output

worksOnSystem

Whether the procedure can be run on the system database or not. Default Output

signature

The signature of the procedure.

argumentDescription

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

returnDescription

List of the returned values for the procedure, as map of strings with name, type, and description.

admin

true if this procedure is an admin procedure.

rolesExecution

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

rolesBoostedExecution

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

option

Map of extra output, e.g. if the procedure is deprecated.

1. Syntax

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 RETURN clause, the YIELD clause is mandatory and may not be omitted.

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 RETURN clause, the YIELD clause is mandatory and may not be omitted.

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 RETURN clause, the YIELD clause is mandatory and may not be omitted.

2. 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 *.

Query
SHOW PROCEDURES
Table 2. Result
name description mode worksOnSystem

"db.awaitIndex"

"Wait for an index to come online (for example: CALL db.awaitIndex("MyIndex", 300))."

"READ"

true

"db.awaitIndexes"

"Wait for all indexes to come online (for example: CALL db.awaitIndexes(300))."

"READ"

true

"db.checkpoint"

"Initiate and wait for a new check point, or wait any already on-going check point to complete. Note that this temporarily disables the `dbms.checkpoint.iops.limit` setting in order to make the check point complete faster. This might cause transaction throughput to degrade slightly, due to increased IO load."

"DBMS"

true

"db.clearQueryCaches"

"Clears all query caches."

"DBMS"

true

"db.constraints"

"List all constraints in the database."

"READ"

true

"db.createIndex"

"Create a named schema index with specified index provider and configuration (optional). Yield: name, labels, properties, providerName, status"

"SCHEMA"

false

"db.createLabel"

"Create a label"

"WRITE"

false

"db.createNodeKey"

"Create a named node key constraint. Backing index will use specified index provider and configuration (optional). Yield: name, labels, properties, providerName, status"

"SCHEMA"

false

"db.createProperty"

"Create a Property"

"WRITE"

false

"db.createRelationshipType"

"Create a RelationshipType"

"WRITE"

false

"db.createUniquePropertyConstraint"

"Create a named unique property constraint. Backing index will use specified index provider and configuration (optional). Yield: name, labels, properties, providerName, status"

"SCHEMA"

false

"db.index.fulltext.awaitEventuallyConsistentIndexRefresh"

"Wait for the updates from recently committed transactions to be applied to any eventually-consistent full-text indexes."

"READ"

true

"db.index.fulltext.createNodeIndex"

"Create a node full-text index for the given labels and properties. The optional 'config' map parameter can be used to supply settings to the index. Supported settings are 'analyzer', for specifying what analyzer to use when indexing and querying. Use the `db.index.fulltext.listAvailableAnalyzers` procedure to see what options are available. And 'eventually_consistent' which can be set to 'true' to make this index eventually consistent, such that updates from committing transactions are applied in a background thread."

"SCHEMA"

false

"db.index.fulltext.createRelationshipIndex"

"Create a relationship full-text index for the given relationship types and properties. The optional 'config' map parameter can be used to supply settings to the index. Supported settings are 'analyzer', for specifying what analyzer to use when indexing and querying. Use the `db.index.fulltext.listAvailableAnalyzers` procedure to see what options are available. And 'eventually_consistent' which can be set to 'true' to make this index eventually consistent, such that updates from committing transactions are applied in a background thread."

"SCHEMA"

false

"db.index.fulltext.drop"

"Drop the specified index."

"SCHEMA"

false

Rows: 15

3. 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:

Query
SHOW PROCEDURES YIELD name, admin
WHERE admin
Table 3. Result
name admin

"db.clearQueryCaches"

true

"db.listLocks"

true

"db.prepareForReplanning"

true

"db.stats.clear"

true

"db.stats.collect"

true

"db.stats.retrieve"

true

"db.stats.retrieveAllAnonymized"

true

Rows: 7

4. 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, how to use the EXECUTABLE clause. The first option, is to filter for the current user:

Query
SHOW PROCEDURES EXECUTABLE BY CURRENT USER YIELD *
Table 4. Result
name description rolesExecution rolesBoostedExecution ...

"db.awaitIndex"

"Wait for an index to come online (for example: CALL db.awaitIndex("MyIndex", 300))."

<null>

<null>

"db.awaitIndexes"

"Wait for all indexes to come online (for example: CALL db.awaitIndexes(300))."

<null>

<null>

"db.checkpoint"

"Initiate and wait for a new check point, or wait any already on-going check point to complete. Note that this temporarily disables the `dbms.checkpoint.iops.limit` setting in order to make the check point complete faster. This might cause transaction throughput to degrade slightly, due to increased IO load."

<null>

<null>

"db.constraints"

"List all constraints in the database."

<null>

<null>

"db.createIndex"

"Create a named schema index with specified index provider and configuration (optional). Yield: name, labels, properties, providerName, status"

<null>

<null>

"db.createLabel"

"Create a label"

<null>

<null>

"db.createNodeKey"

"Create a named node key constraint. Backing index will use specified index provider and configuration (optional). Yield: name, labels, properties, providerName, status"

<null>

<null>

"db.createProperty"

"Create a Property"

<null>

<null>

"db.createRelationshipType"

"Create a RelationshipType"

<null>

<null>

"db.createUniquePropertyConstraint"

"Create a named unique property constraint. Backing index will use specified index provider and configuration (optional). Yield: name, labels, properties, providerName, status"

<null>

<null>

Rows: 10

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

The second option, filters the list to only contain procedures executable by a specific user:

Query
SHOW PROCEDURES EXECUTABLE BY jake
Table 5. Result
name description mode worksOnSystem

"db.awaitIndex"

"Wait for an index to come online (for example: CALL db.awaitIndex("MyIndex", 300))."

"READ"

true

"db.awaitIndexes"

"Wait for all indexes to come online (for example: CALL db.awaitIndexes(300))."

"READ"

true

"db.checkpoint"

"Initiate and wait for a new check point, or wait any already on-going check point to complete. Note that this temporarily disables the `dbms.checkpoint.iops.limit` setting in order to make the check point complete faster. This might cause transaction throughput to degrade slightly, due to increased IO load."

"DBMS"

true

"db.constraints"

"List all constraints in the database."

"READ"

true

"db.createIndex"

"Create a named schema index with specified index provider and configuration (optional). Yield: name, labels, properties, providerName, status"

"SCHEMA"

false

"db.createLabel"

"Create a label"

"WRITE"

false

"db.createNodeKey"

"Create a named node key constraint. Backing index will use specified index provider and configuration (optional). Yield: name, labels, properties, providerName, status"

"SCHEMA"

false

"db.createProperty"

"Create a Property"

"WRITE"

false

"db.createRelationshipType"

"Create a RelationshipType"

"WRITE"

false

"db.createUniquePropertyConstraint"

"Create a named unique property constraint. Backing index will use specified index provider and configuration (optional). Yield: name, labels, properties, providerName, status"

"SCHEMA"

false

Rows: 10