Glossary of keywords

This section comprises a glossary of all the keywords — grouped by category and thence ordered lexicographically — in the Cypher® query language.

Clauses

Clause Category Description

CALL […​YIELD]

Reading/Writing

Invoke a procedure deployed in the database.

CALL {...}

Reading/Writing

Evaluates a subquery, typically used for post-union processing or aggregations.

CALL { ... } IN TRANSACTIONS

Reading/Writing

Evaluates a subquery in separate transactions. Typically used when modifying or importing large amounts of data.

CREATE

Writing

Create nodes and relationships.

CREATE CONSTRAINT [existence] [IF NOT EXISTS] FOR (n:Label) REQUIRE n.property IS NOT NULL [OPTIONS {}]

Schema

Create a constraint ensuring that all nodes with a particular label have a certain property.

CREATE CONSTRAINT [existence] [IF NOT EXISTS] FOR ()-"["r:REL_TYPE"]"-() REQUIRE r.property IS NOT NULL [OPTIONS {}]

Schema

Create a constraint ensuring that all relationships with a particular relationship type have a certain property.

CREATE CONSTRAINT [node_key] [IF NOT EXISTS] FOR (n:Label) REQUIRE (n.prop1[, …​, n.propN]) IS [NODE] KEY [OPTIONS {optionKey: optionValue[, …​]}]

Schema

Create a constraint ensuring that all nodes with a particular label have all the specified properties and that the combination of property values is unique; i.e. ensures existence and uniqueness.

CREATE CONSTRAINT [rel_key] [IF NOT EXISTS] FOR ()-"["r:REL_TYPE"]"-() REQUIRE (r.prop1[, …​, r.propN]) IS [REL[ATIONSHIP]] KEY [OPTIONS {optionKey: optionValue[, …​]}]

Schema

Create a constraint ensuring that all relationships with a particular relationship type have all the specified properties and that the combination of property values is unique; i.e. ensures existence and uniqueness.

CREATE CONSTRAINT [property_type] [IF NOT EXISTS] FOR (n:Label) REQUIRE n.property IS :: type [OPTIONS {}]

Schema

Create a constraint ensuring that the property has the required property type (given by type) for all nodes with a particular label.

CREATE CONSTRAINT [property_type] [IF NOT EXISTS] FOR ()-"["r:REL_TYPE"]"-() REQUIRE r.property IS :: type [OPTIONS {}]

Schema

Create a constraint ensuring that the property has the required property type (given by type) for all relationships with a particular relationship type.

CREATE CONSTRAINT [uniqueness] [IF NOT EXISTS] FOR (n:Label) REQUIRE (n.prop1[, …​, n.propN]) IS [NODE] UNIQUE [OPTIONS {optionKey: optionValue[, …​]}]

Schema

Create a constraint ensuring the uniqueness of the combination of node label and property values for a particular property key combination across all nodes.

CREATE CONSTRAINT [uniqueness] [IF NOT EXISTS] FOR ()-"["r:REL_TYPE"]"-() REQUIRE (r.prop1[, …​, r.propN]) IS [REL[ATIONSHIP]] UNIQUE [OPTIONS {optionKey: optionValue[, …​]}]

Schema

Create a constraint ensuring the uniqueness of the combination of relationship type and property values for a particular property key combination across all relationships.

CREATE FULLTEXT INDEX [name] [IF NOT EXISTS] FOR (n:Label["|" …​ "|" LabelN]) ON EACH "[" n.property[, …​, n.propertyN] "]" [OPTIONS {optionKey: optionValue[, …​]}]

Schema

Create a fulltext index on nodes.

CREATE FULLTEXT INDEX [name] [IF NOT EXISTS] FOR ()-"["r:TYPE["|" …​ "|" TYPE_N]"]"-() ON EACH "[" r.property[, …​, r.propertyN] "]" [OPTIONS {optionKey: optionValue[, …​]}]

Schema

Create a fulltext index on relationships.

CREATE LOOKUP INDEX [name] [IF NOT EXISTS] FOR (n) ON EACH labels(n) [OPTIONS {optionKey: optionValue[, …​]}]

Schema

Create an index on all nodes with any label.

CREATE LOOKUP INDEX [name] [IF NOT EXISTS] FOR ()-"["r"]"-() ON [EACH] type(r) [OPTIONS {optionKey: optionValue[, …​]}]

Schema

Create an index on all relationships with any relationship type.

CREATE POINT INDEX [name] [IF NOT EXISTS] FOR (n:Label) ON (n.property) [OPTIONS {optionKey: optionValue[, …​]}]

Schema

Create a point index on nodes.

CREATE POINT INDEX [name] [IF NOT EXISTS] FOR ()-"["r:TYPE"]"-() ON (r.property) [OPTIONS {optionKey: optionValue[, …​]}]

Schema

Create a point index on relationships.

CREATE [RANGE] INDEX [name] [IF NOT EXISTS] FOR (n:Label) ON (n.property[, …​, n.propertyN]) [OPTIONS {optionKey: optionValue[, …​]}]

Schema

Create a range index on nodes.

CREATE [RANGE] INDEX [name] [IF NOT EXISTS] FOR ()-"["r:TYPE"]"-() ON (r.property[, …​, r.propertyN]) [OPTIONS {optionKey: optionValue[, …​]}]

Schema

Create a range index on relationships.

CREATE TEXT INDEX [name] [IF NOT EXISTS] FOR (n:Label) ON (n.property) [OPTIONS {optionKey: optionValue[, …​]}]

Schema

Create a text index on nodes.

CREATE TEXT INDEX [name] [IF NOT EXISTS] FOR ()-"["r:TYPE"]"-() ON (r.property) [OPTIONS {optionKey: optionValue[, …​]}]

Schema

Create a text index on relationships.

DELETE

Writing

Delete nodes, relationships or paths. Any node to be deleted must also have all associated relationships explicitly deleted.

DETACH DELETE

Writing

Delete a node or set of nodes. All associated relationships will automatically be deleted.

DROP CONSTRAINT name [IF EXISTS]

Schema

Drop a constraint using the name.

DROP INDEX name [IF EXISTS]

Schema

Drop an index using the name.

FOREACH

Writing

Update data within a list, whether components of a path, or the result of aggregation.

LIMIT

Reading sub-clause

A sub-clause used to constrain the number of rows in the output.

LOAD CSV

Importing data

Use when importing data from CSV files.

MATCH

Reading

Specify the patterns to search for in the database.

MERGE

Reading/Writing

Ensures that a pattern exists in the graph. Either the pattern already exists, or it needs to be created.

ON CREATE

Reading/Writing

Used in conjunction with MERGE, specifying the actions to take if the pattern needs to be created.

ON MATCH

Reading/Writing

Used in conjunction with MERGE, specifying the actions to take if the pattern already exists.

OPTIONAL MATCH

Reading

Specify the patterns to search for in the database while using nulls for missing parts of the pattern.

ORDER BY [ASC[ENDING] | DESC[ENDING]]

Reading sub-clause

A sub-clause following RETURN or WITH, specifying that the output should be sorted in either ascending (the default) or descending order.

REMOVE

Writing

Remove properties and labels from nodes and relationships.

RETURN …​ [AS]

Projecting

Defines what to include in the query result set.

SET

Writing

Update labels on nodes and properties on nodes and relationships.

SHOW […​] CONSTRAINT[S]

Schema

List constraints in the database, either all or filtered on type. Also allows WHERE and YIELD clauses.

SHOW [ALL|FULLTEXT|LOOKUP|POINT|RANGE|TEXT] INDEX[ES]

Schema

List indexes in the database, either all or filtered on fulltext, lookup, point, range, or text indexes. Also allows WHERE and YIELD clauses.

SHOW [ALL|BUILT IN|USER DEFINED] FUNCTION[S] [EXECUTABLE [BY {CURRENT USER|username}]]

DBMS

List functions, either all or filtered. Available filters are executable by a user or function type (built-in or user-defined). Also allows WHERE and YIELD clauses.

SHOW PROCEDURE[S] [EXECUTABLE [BY {CURRENT USER|username}]]

DBMS

List procedures, either all or filtered on executable by a user. Also allows WHERE and YIELD clauses.

SHOW SETTINGS[S] [setting-name[, …​]]

DBMS

List configuration settings, either all or filtered on setting name(s). Also allows WHERE and YIELD clauses.

SHOW TRANSACTION[S] [transaction-id[, …​]]

DBMS

List transactions, either all or filtered on ID. Also allows WHERE and YIELD clauses.

SKIP

Reading/Writing

A sub-clause defining from which row to start including the rows in the output.

TERMINATE TRANSACTION[S] transaction-id[, …​]

DBMS

Terminate transactions with the given IDs.

UNION

Set operations

Combines the result of multiple queries. Duplicates are removed.

UNION ALL

Set operations

Combines the result of multiple queries. Duplicates are retained.

UNWIND …​ [AS]

Projecting

Expands a list into a sequence of rows.

USE

Multiple graphs

Determines which graph a query, or query part, is executed against.

USING INDEX variable:Label(property)

Hint

Index hints are used to specify which index, if any, the planner should use as a starting point.

USING INDEX SEEK variable:Label(property)

Hint

Index seek hint instructs the planner to use an index seek for this clause.

USING JOIN ON variable

Hint

Join hints are used to enforce a join operation at specified points.

USING SCAN variable:Label

Hint

Scan hints are used to force the planner to do a label scan (followed by a filtering operation) instead of using an index.

WITH …​ [AS]

Projecting

Allows query parts to be chained together, piping the results from one to be used as starting points or criteria in the next.

WHERE

Reading sub-clause

A sub-clause used to add constraints to the patterns in a MATCH or OPTIONAL MATCH clause, or to filter the results of a WITH clause.

Operators

Operator Category Description

%

Mathematical

Modulo division.

*

Mathematical

Multiplication.

*

Temporal

Multiplying a duration with a number.

+

Mathematical

Addition.

+

String

Concatenation.

+=

Property

Property mutation.

+

List

Concatenation

+

Temporal

Adding two durations, or a duration and a temporal instant.

-

Mathematical

Subtraction or unary minus.

-

Temporal

Subtracting a duration from a temporal instant or from another duration.

.

Map

Static value access by key.

.

Property

Static property access.

/

Mathematical

Division.

/

Temporal

Dividing a duration by a number.

<

Comparison

Less than.

<=

Comparison

Less than or equal to.

<>

Comparison

Inequality.

=

Comparison

Equality.

=

Property

Property replacement.

=~

String

Regular expression match.

>

Comparison

Greater than.

>=

Comparison

Greater than or equal to.

AND

Boolean

Conjunction.

CONTAINS

String comparison

Case-sensitive inclusion search.

DISTINCT

Aggregation

Duplicate removal.

ENDS WITH

String comparison

Case-sensitive suffix search.

IN

List

List element existence check.

IS NOT NULL

Comparison

Non-null check.

IS NULL

Comparison

null check.

NOT

Boolean

Negation.

OR

Boolean

Disjunction.

STARTS WITH

String comparison

Case-sensitive prefix search.

XOR

Boolean

Exclusive disjunction.

[]

Map

Subscript (dynamic value access by key).

[]

Property

Subscript (dynamic property access).

[]

List

Subscript (accessing element(s) in a list).

^

Mathematical

Exponentiation.

Functions

Function Category Description

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

Returns the current DATE.

date({year [, month, day]})

Temporal

Returns a calendar (Year-Month-Day) DATE.

date({year [, week, dayOfWeek]})

Temporal

Returns a week (Year-Week-Day) DATE.

date({year [, quarter, dayOfQuarter]})

Temporal

Returns a quarter (Year-Quarter-Day) DATE.

date({year [, ordinalDay]})

Temporal

Returns an ordinal (Year-Day) DATE.

date(string)

Temporal

Returns a DATE by parsing a STRING.

date({map})

Temporal

Returns a DATE from a map of another temporal value’s components.

date.realtime()

Temporal

Returns the current DATE using the realtime clock.

date.statement()

Temporal

Returns the current DATE using the statement clock.

date.transaction()

Temporal

Returns the current DATE using the transaction clock.

date.truncate()

Temporal

Returns a DATE obtained by truncating a value at a specific component boundary. Truncation summary.

datetime()

Temporal

Returns the current ZONED DATETIME.

datetime({year [, month, day, …​]})

Temporal

Returns a calendar (Year-Month-Day) ZONED DATETIME.

datetime({year [, week, dayOfWeek, …​]})

Temporal

Returns a week (Year-Week-Day) ZONED DATETIME.

datetime({year [, quarter, dayOfQuarter, …​]})

Temporal

Returns a quarter (Year-Quarter-Day) ZONED DATETIME.

datetime({year [, ordinalDay, …​]})

Temporal

Returns an ordinal (Year-Day) ZONED DATETIME.

datetime(string)

Temporal

Returns a ZONED DATETIME by parsing a STRING.

datetime({map})

Temporal

Returns a ZONED DATETIME from a map of another temporal value’s components.

datetime({epochSeconds})

Temporal

Returns a ZONED DATETIME from a timestamp.

datetime.realtime()

Temporal

Returns the current ZONED DATETIME using the realtime clock.

datetime.statement()

Temporal

Returns the current ZONED DATETIME using the statement clock.

datetime.transaction()

Temporal

Returns the current ZONED DATETIME using the transaction clock.

datetime.truncate()

Temporal

Returns a ZONED DATETIME obtained by truncating a value at a specific component boundary. Truncation summary.

degrees()

Trigonometric

Converts radians to degrees.

duration({map})

Temporal

Returns a DURATION from a map of its components.

duration(string)

Temporal

Returns a DURATION by parsing a STRING.

duration.between()

Temporal

Returns a DURATION equal to the difference between two given instants.

duration.inDays()

Temporal

Returns a DURATION equal to the difference in whole days or weeks between two given instants.

duration.inMonths()

Temporal

Returns a DURATION equal to the difference in whole months, quarters or years between two given instants.

duration.inSeconds()

Temporal

Returns a DURATION equal to the difference in seconds and fractions of seconds, or minutes or hours, between two given instants.

e()

Logarithmic

Returns the base of the natural logarithm, e.

endNode()

Scalar

Returns the end NODE of a RELATIONSHIP.

exists()

Predicate

Returns true if a match for the pattern exists in the graph.

exp()

Logarithmic

Returns e^n, where e is the base of the natural logarithm, and n is the value of the argument expression.

floor()

Numeric

Returns the largest FLOAT that is less than or equal to a number and equal to an INTEGER.

haversin()

Trigonometric

Returns half the versine of a number.

head()

Scalar

Returns the first element in a LIST<ANY>.

id()

Scalar

Returns the id of a RELATIONSHIP or NODE.

isEmpty()

Predicate

Returns true if the given LIST<ANY> or MAP contains no elements or if the given STRING contains no characters.

isNaN()

Numeric

Returns true if the given numeric value is NaN (Not a Number).

keys()

List

Returns a LIST<STRING> containing the STRING representations for all the property names of a NODE, RELATIONSHIP, or MAP.

labels()

List

Returns a LIST<STRING> containing the STRING representations for all the labels of a NODE.

last()

Scalar

Returns the last element in a LIST<ANY>.

left()

String

Returns a STRING containing the specified number (INTEGER) of leftmost characters in the given STRING.

length()

Scalar

Returns the length of a PATH.

localdatetime()

Temporal

Returns the current LOCAL DATETIME.

localdatetime({year [, month, day, …​]})

Temporal

Returns a calendar (Year-Month-Day) LOCAL DATETIME.

localdatetime({year [, week, dayOfWeek, …​]})

Temporal

Returns a week (Year-Week-Day) LOCAL DATETIME.

localdatetime({year [, quarter, dayOfQuarter, …​]})

Temporal

Returns a quarter (Year-Quarter-Day) ZONED DATETIME.

localdatetime({year [, ordinalDay, …​]})

Temporal

Returns an ordinal (Year-Day) LOCAL DATETIME.

localdatetime(string)

Temporal

Returns a LOCAL DATETIME by parsing a STRING.

localdatetime({map})

Temporal

Returns a LOCAL DATETIME from a map of another temporal value’s components.

localdatetime.realtime()

Temporal

Returns the current LOCAL DATETIME using the realtime clock.

localdatetime.statement()

Temporal

Returns the current LOCAL DATETIME using the statement clock.

localdatetime.transaction()

Temporal

Returns the current LOCAL DATETIME using the transaction clock.

localdatetime.truncate()

Temporal

Returns a LOCAL DATETIME obtained by truncating a value at a specific component boundary. Truncation summary.

localtime()

Temporal

Returns the current LOCAL TIME.

localtime({hour [, minute, second, …​]})

Temporal

Returns a LOCAL TIME with the specified component values.

localtime(string)

Temporal

Returns a LOCAL TIME by parsing a STRING.

localtime({time [, hour, …​]})

Temporal

Returns a LOCAL TIME from a map of another temporal value’s components.

localtime.realtime()

Temporal

Returns the current LOCAL TIME using the realtime clock.

localtime.statement()

Temporal

Returns the current LOCAL TIME using the statement clock.

localtime.transaction()

Temporal

Returns the current LOCAL TIME using the transaction clock.

localtime.truncate()

Temporal

Returns a LOCAL TIME obtained by truncating a value at a specific component boundary. Truncation summary.

log()

Logarithmic

Returns the natural logarithm of a FLOAT.

log10()

Logarithmic

Returns the common logarithm (base 10) of a FLOAT.

lTrim()

String

Returns the given STRING with leading whitespace removed.

max()

Aggregating

Returns the maximum value in a set of values.

min()

Aggregating

Returns the minimum value in a set of values.

nodes()

List

Returns a LIST<NODE> containing all the NODE values in a PATH.

none()

Predicate

Returns true if the predicate holds for no element in the given LIST<ANY>.

percentileCont()

Aggregating

Returns the percentile of the given value over a group using linear interpolation.

percentileDisc()

Aggregating

Returns the nearest value to the given percentile over a group using a rounding method.

pi()

Trigonometric

Returns the mathematical constant pi.

point() - Cartesian 2D

Spatial

Returns a 2D POINT object, given two coordinate values in the Cartesian coordinate system.

point() - Cartesian 3D

Spatial

Returns a 3D POINT object, given three coordinate values in the Cartesian coordinate system.

point() - WGS 84 2D

Spatial

Returns a 2D POINT object, given two coordinate values in the WGS 84 coordinate system.

point() - WGS 84 3D

Spatial

Returns a 3D POINT object, given three coordinate values in the WGS 84 coordinate system.

point.distance()

Spatial

Returns true if the provided POINT is within the bounding box defined by the two provided points.

point.withinBBox()

Spatial

Returns a FLOAT representing the geodesic distance between any two points in the same CRS.

properties()

Scalar

Returns a MAP containing all the properties of a NODE or RELATIONSHIP.

radians()

Trigonometric

Converts degrees to radians.

rand()

Numeric

Returns a random FLOAT in the range from 0 (inclusive) to 1 (exclusive); i.e. [0, 1).

randomUUID()

Scalar

Returns a STRING value corresponding to a randomly-generated UUID.

range()

List

Returns a LIST<INTEGER> comprising all INTEGER values within a specified range.

reduce()

List

Runs an expression against individual elements of a LIST<ANY>, storing the result of the expression in an accumulator.

relationships()

List

Returns a LIST<RELATIONSHIP> containing all the RELATIONSHIP values in a PATH.

replace()

String

Returns a STRING in which all occurrences of a specified string in the given STRING have been replaced by another (specified) STRING.

reverse()

List

Returns a LIST<ANY> in which the order of all elements in the given LIST<ANY> have been reversed.

reverse()

String

Returns a STRING in which the order of all characters in the given STRING have been reversed.

right()

String

Returns a STRING containing the specified number of rightmost characters in the given STRING.

round()

Numeric

Returns the FLOAT of the given number rounded to the nearest mathematical INTEGER, with half-way values always rounded up.

round(), with precision

Numeric

Returns the FLOAT of the given number rounded with the specified precision, with half-values always being rounded up.

round(), with precision and rounding mode

Numeric

Returns the FLOAT of the given number rounded with the specified precision and the specified rounding mode.

rTrim()

String

Returns the given STRING with trailing whitespace removed.

sign()

Numeric

Returns the signum of a number: 0 if the number is 0, -1 for any negative number, and 1 for any positive number.

sin()

Trigonometric

Returns the sine of a FLOAT.

single()

Predicate

Returns true if the predicate holds for exactly one of the elements in the given LIST<ANY>.

size()

Scalar

Returns the number of items in a LIST<ANY>.

size() applied to pattern comprehension

Scalar

Returns the number of paths matching the pattern comprehension.

size() applied to string

Scalar

Returns the number of Unicode characters in a STRING.

split()

String

Returns a LIST<STRING> resulting from the splitting of the given STRING around matches of the given delimiter.

sqrt()

Logarithmic

Returns the square root of a FLOAT.

startNode()

Scalar

Returns the start NODE of a RELATIONSHIP.

stDev()

Aggregating

Returns the standard deviation for the given value over a group for a sample of a population.

stDevP()

Aggregating

Returns the standard deviation for the given value over a group for an entire population.

substring()

String

Returns a substring of the given STRING, beginning with a 0-based index start and length.

sum()

Aggregating

Returns the sum of a set of numeric values.

tail()

List

Returns all but the first element in a LIST<ANY>.

tan()

Trigonometric

Returns the tangent of a FLOAT.

time()

Temporal

Returns the current ZONED TIME.

time({hour [, minute, …​]})

Temporal

Returns a ZONED TIME with the specified component values.

time(string)

Temporal

Returns a ZONED TIME by parsing a STRING.

time({time [, hour, …​, timezone]})

Temporal

Returns a ZONED TIME from a map of another temporal value’s components.

time.realtime()

Temporal

Returns the current ZONED TIME using the realtime clock.

time.statement()

Temporal

Returns the current ZONED TIME using the statement clock.

time.transaction()

Temporal

Returns the current ZONED TIME using the transaction clock.

time.truncate()

Temporal

Returns a ZONED TIME obtained by truncating a value at a specific component boundary. Truncation summary.

timestamp()

Scalar

Returns the difference, measured in milliseconds, between the current time and midnight, January 1, 1970 UTC.

toBoolean()

Scalar

Converts a STRING value to a BOOLEAN value.

toFloat()

Scalar

Converts an INTEGER or STRING value to a FLOAT.

toInteger()

Scalar

Converts a FLOAT or STRING value to an INTEGER value.

toLower()

String

Returns the given STRING in lowercase.

toString()

String

Converts an INTEGER, FLOAT, BOOLEAN or temporal (i.e. DATE, ZONED TIME, LOCAL TIME, ZONED DATETIME, LOCAL DATETIME or DURATION) value to a STRING.

toUpper()

String

Returns the given STRING in uppercase.

trim()

String

Returns the given STRING with leading and trailing whitespace removed.

type()

Scalar

Returns a STRING representation of the RELATIONSHIP type.

Expressions

Name Description

CASE

A generic conditional expression, similar to if/else statements available in other languages.

COLLECT {…​}

Creates a list with the rows returned by a subquery.

COUNT {…​}

Computes the number of results of a subquery.

EXISTS {…​}

Evaluates the existence of a subquery.

IS :: type

Verifies that an expression is of a certain type.

Cypher query options

Name Type Description //// Removed in 5.0

CYPHER $version query

Version

This will force 'query' to use Neo4j Cypher $version. ////

CYPHER runtime=interpreted query

Runtime

This will force the query planner to use the interpreted runtime. This is the only option in Neo4j Community Edition.

CYPHER runtime=slotted query

Runtime

This will cause the query planner to use the slotted runtime. This is only available in Neo4j Enterprise Edition.

CYPHER runtime=pipelined query

Runtime

This will cause the query planner to use the pipelined runtime if it supports 'query'. This is only available in Neo4j Enterprise Edition.

Administrative commands

The following commands are only executable against the system database:

Command Admin category Description

ALTER ALIAS …​ [IF EXISTS] SET DATABASE …​

Database alias

Modifies a database alias.

ALTER CURRENT USER SET PASSWORD FROM …​ TO

User and role

Change the password of the user that is currently logged in.

ALTER DATABASE …​ [IF EXISTS] [SET ACCESS {READ ONLY | READ WRITE}] [SET TOPOLOGY n PRIMAR{Y|IES} [m SECONDAR{Y|IES}]] [WAIT [n [SEC[OND[S]]]]|NOWAIT]

Database

Modifies the database access mode and / or topology.

ALTER SERVER …​ [SET OPTIONS] {…​}

Server management

Modifies the options for a server.

ALTER USER …​ [IF EXISTS] [SET [PLAINTEXT | ENCRYPTED] PASSWORD {password [CHANGE [NOT] REQUIRED] | CHANGE [NOT] REQUIRED}] [SET STATUS {ACTIVE | SUSPENDED}] [SET HOME DATABASE name] [REMOVE HOME DATABASE]

User and role

Changes a user account. Changes can include setting a new password, setting the account status, setting or removing home database and enabling that the user should change the password upon next login.

CREATE [OR REPLACE] ALIAS …​ [IF NOT EXISTS] FOR DATABASE …​

Database alias

Creates a new database alias.

CREATE [OR REPLACE] COMPOSITE DATABASE …​ [IF NOT EXISTS] [OPTIONS {}] [WAIT [n [SEC[OND[S]]]]|NOWAIT]

Database

Creates a new composite database.

CREATE [OR REPLACE] DATABASE …​ [IF NOT EXISTS] [TOPOLOGY n PRIMAR{Y|IES} [m SECONDAR{Y|IES}]] [OPTIONS {optionKey: optionValue[, …​]}] [WAIT [n [SEC[OND[S]]]]|NOWAIT]

Database

Creates a new database.

CREATE [OR REPLACE] ROLE …​ [IF NOT EXISTS] [AS COPY OF]

User and role

Creates new roles.

CREATE [OR REPLACE] USER …​ [IF NOT EXISTS] SET [PLAINTEXT | ENCRYPTED] PASSWORD …​ [[SET PASSWORD] CHANGE [NOT] REQUIRED] [SET STATUS {ACTIVE | SUSPENDED}] [SET HOME DATABASE name]

User and role

Creates a new user and sets the password for the new account. Optionally the account status and home database can also be set and if the user should change the password upon first login.

DEALLOCATE DATABASE(S) FROM SERVER(S) …​

Server management

Removes databases from the specified servers.

DENY [IMMUTABLE] …​ ON DATABASE …​ TO

Privilege

Denies a database or schema privilege to one or multiple roles.

DENY [IMMUTABLE] …​ ON DBMS TO

Privilege

Denies a DBMS privilege to one or multiple roles.

DENY [IMMUTABLE] …​ ON GRAPH …​ [NODES | RELATIONSHIPS | ELEMENTS] …​ TO

Privilege

Denies a graph privilege for one or multiple specified elements to one or multiple roles.

DROP ALIAS …​ [IF EXISTS] FOR DATABASE

Database alias

Deletes a specified database alias.

DROP COMPOSITE DATABASE …​ [IF EXISTS] [DUMP DATA | DESTROY DATA] [WAIT [n [SEC[OND[S]]]]|NOWAIT]

Database

Deletes a specified composite database.

DROP DATABASE …​ [IF EXISTS] [DUMP DATA | DESTROY DATA]

Database

Deletes a specified database (either standard or composite).

DROP ROLE …​ [IF EXISTS]

User and role

Deletes a specified role.

DROP SERVER …​

Server management

Removes a specified server.

DROP USER …​ [IF EXISTS]

User and role

Deletes a specified user.

ENABLE SERVER [OPTIONS]

Server management

Enables a specified server.

GRANT [IMMUTABLE] …​ ON DATABASE …​ TO

Privilege

Assigns a database or schema privilege to one or multiple roles.

GRANT [IMMUTABLE] …​ ON DBMS TO

Privilege

Assigns a DBMS privilege to one or multiple roles.

GRANT [IMMUTABLE] …​ ON GRAPH …​ [NODES | RELATIONSHIPS | ELEMENTS] …​ TO

Privilege

Assigns a graph privilege for one or multiple specified elements to one or multiple roles.

GRANT [IMMUTABLE] ROLE[S] …​ TO

User and role

Assigns one or multiple roles to one or multiple users.

REALLOCATE DATABASE(S)

Server management

Re-balance databases among all servers.

RENAME ROLE …​ [IF EXISTS] TO …​

User and role

Changes the name of a role.

RENAME USER …​ [IF EXISTS] TO …​

User and role

Changes the name of a user.

REVOKE [IMMUTABLE] [GRANT | DENY] …​ ON DATABASE …​ FROM

Privilege

Removes a database or schema privilege from one or multiple roles.

REVOKE [IMMUTABLE] [GRANT | DENY] …​ ON DBMS FROM

Privilege

Removes a DBMS privilege from one or multiple roles.

REVOKE [IMMUTABLE] [GRANT | DENY] …​ ON GRAPH …​ [NODES | RELATIONSHIPS | ELEMENTS] …​ FROM

Privilege

Removes a graph privilege for one or multiple specified elements from one or multiple roles.

REVOKE ROLE[S] …​ FROM

User and role

Removes one or multiple roles from one or multiple users.

SHOW ALIASES FOR DATABASE

Database alias

Returns information about all aliases, optionally including driver settings.

SHOW [ALL | POPULATED] ROLES [WITH USERS]

User and role

Returns information about all or populated roles, optionally including the assigned users.

SHOW DATABASE

Database

Returns information about a specified database.

SHOW DATABASES

Database

Returns information about all databases.

SHOW SERVERS

Server management

Returns information about all servers.

SHOW DEFAULT DATABASE

Database

Returns information about the default database.

SHOW HOME DATABASE

Database

Returns information about the current users home database.

SHOW SUPPORTED PRIVILEGES

Privilege

Returns information about supported privileges.

SHOW [ROLE …​ | USER …​ | ALL ] PRIVILEGES [AS [REVOKE] COMMAND[S]]

Privilege

Returns information about role, user or all privileges.

SHOW USERS

User and role

Returns information about all users.

START DATABASE

Database

Starts up a specified database.

STOP DATABASE

Database

Stops a specified database.

Privilege Actions

Name Category Description

ACCESS

Database

Determines whether a user can access a specific database.

ALL DATABASE PRIVILEGES

Database and schema

Determines whether a user is allowed to access, create, drop, and list indexes and constraints, create new labels, types and property names on a specific database.

ALL DBMS PRIVILEGES

DBMS

Determines whether a user is allowed to perform role, user, database and privilege management.

ALL GRAPH PRIVILEGES

GRAPH

Determines whether a user is allowed to perform reads and writes.

ALTER ALIAS

DBMS

Determines whether the user can modify aliases.

ALTER DATABASE

DBMS

Determines whether the user can modify databases and aliases.

ALTER USER

DBMS

Determines whether the user can modify users.

ASSIGN PRIVILEGE

DBMS

Determines whether the user can assign privileges using the GRANT and DENY commands.

ASSIGN ROLE

DBMS

Determines whether the user can grant roles.

COMPOSITE DATABASE MANAGEMENT

DBMS

Determines whether the user can create and delete composite databases.

CONSTRAINT MANAGEMENT

Schema

Determines whether a user is allowed to create, drop, and list constraints on a specific database.

CREATE

GRAPH

Determines whether the user can create a new element (node, relationship or both).

CREATE ALIAS

DBMS

Determines whether the user can create new aliases.

CREATE COMPOSITE DATABASE

DBMS

Determines whether the user can create new composite databases.

CREATE CONSTRAINT

Schema

Determines whether a user is allowed to create constraints on a specific database.

CREATE DATABASE

DBMS

Determines whether the user can create new databases and aliases.

CREATE INDEX

Schema

Determines whether a user is allowed to create indexes on a specific database.

CREATE NEW NODE LABEL

Schema

Determines whether a user is allowed to create new node labels on a specific database.

CREATE NEW PROPERTY NAME

Schema

Determines whether a user is allowed to create new property names on a specific database.

CREATE NEW RELATIONSHIP TYPE

Schema

Determines whether a user is allowed to create new relationship types on a specific database.

CREATE ROLE

DBMS

Determines whether the user can create new roles.

CREATE USER

DBMS

Determines whether the user can create new users.

ALIAS MANAGEMENT

DBMS

Determines whether the user can create, delete, modify and list aliases.

DATABASE MANAGEMENT

DBMS

Determines whether the user can create, delete, and modify databases and aliases.

DELETE

GRAPH

Determines whether the user can delete an element (node, relationship or both).

DROP ALIAS

DBMS

Determines whether the user can delete aliases.

DROP COMPOSITE DATABASE

DBMS

Determines whether the user can delete composite databases.

DROP CONSTRAINT

Schema

Determines whether a user is allowed to drop constraints on a specific database.

DROP DATABASE

DBMS

Determines whether the user can delete databases and aliases.

DROP INDEX

Schema

Determines whether a user is allowed to drop indexes on a specific database.

DROP ROLE

DBMS

Determines whether the user can delete roles.

DROP USER

DBMS

Determines whether the user can delete users.

EXECUTE ADMIN PROCEDURE

DBMS

Determines whether the user can execute admin procedures.

EXECUTE BOOSTED FUNCTION

DBMS

Determines whether the user gets elevated privileges when executing functions.

EXECUTE BOOSTED PROCEDURE

DBMS

Determines whether the user gets elevated privileges when executing procedures.

EXECUTE FUNCTION

DBMS

Determines whether the user can execute functions.

EXECUTE PROCEDURE

DBMS

Determines whether the user can execute procedures.

IMPERSONATE

DBMS

Determines whether a user can impersonate another one and assume their privileges.

INDEX MANAGEMENT

Schema

Determines whether a user is allowed to create, drop, and list indexes on a specific database.

MATCH

GRAPH

Determines whether the properties of an element (node, relationship or both) can be read and the element can be found and traversed while executing queries on the specified graph.

MERGE

GRAPH

Determines whether the user can find, read, create and set properties on an element (node, relationship or both).

NAME MANAGEMENT

Schema

Determines whether a user is allowed to create new labels, types and property names on a specific database.

PRIVILEGE MANAGEMENT

DBMS

Determines whether the user can show, assign and remove privileges.

READ

GRAPH

Determines whether the properties of an element (node, relationship or both) can be read while executing queries on the specified graph.

REMOVE LABEL

GRAPH

Determines whether the user can remove a label from a node using the REMOVE clause.

REMOVE PRIVILEGE

DBMS

Determines whether the user can remove privileges using the REVOKE command.

REMOVE ROLE

DBMS

Determines whether the user can revoke roles.

RENAME ROLE

DBMS

Determines whether the user can rename roles.

RENAME USER

DBMS

Determines whether the user can rename users.

ROLE MANAGEMENT

DBMS

Determines whether the user can create, drop, grant, revoke and show roles.

SERVER MANAGEMENT

DBMS

Determines whether the user can enable, alter, rename, reallocate, deallocate, drop, and show servers.

SET DATABASE ACCESS

DBMS

Determines whether the user can modify the database access mode.

SET LABEL

GRAPH

Determines whether the user can set a label to a node using the SET clause.

SET PASSWORDS

DBMS

Determines whether the user can modify users' passwords and whether those passwords must be changed upon first login.

SET PROPERTY

GRAPH

Determines whether the user can set a property to an element (node, relationship or both) using the SET clause.

SET USER HOME DATABASE

DBMS

Determines whether the user can modify the home database of users.

SET USER STATUS

DBMS

Determines whether the user can modify the account status of users.

SHOW ALIAS

DBMS

Determines whether the user is allowed to list aliases.

SHOW CONSTRAINT

Schema

Determines whether the user is allowed to list constraints.

SHOW INDEX

Schema

Determines whether the user is allowed to list indexes.

SHOW PRIVILEGE

DBMS

Determines whether the user can get information about privileges assigned to users and roles.

SHOW ROLE

DBMS

Determines whether the user can get information about existing and assigned roles.

SHOW SERVERS

DBMS

Determines whether the user can get information about servers.

SHOW SETTINGS

DBMS

Determines whether the user can get information about configuration settings.

SHOW TRANSACTION

Database

Determines whether a user is allowed to list transactions and queries.

SHOW USER

DBMS

Determines whether the user can get information about existing users.

START

Database

Determines whether a user can start up a specific database.

STOP

Database

Determines whether a user can stop a specific running database.

TERMINATE TRANSACTION

Database

Determines whether a user is allowed to end running transactions and queries.

TRANSACTION MANAGEMENT

Database

Determines whether a user is allowed to list and end running transactions and queries.

TRAVERSE

GRAPH

Determines whether an element (node, relationship or both) can be found and traversed while executing queries on the specified graph.

USER MANAGEMENT

DBMS

Determines whether the user can create, drop, modify and show users.

WRITE

GRAPH

Determines whether the user can execute write operations on the specified graph.