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 |
---|---|---|
Reading/Writing |
Invoke a procedure deployed in the database. |
|
Reading/Writing |
Evaluates a subquery, typically used for post-union processing or aggregations. |
|
Reading/Writing |
Evaluates a subquery in separate transactions. Typically used when modifying or importing large amounts of data. |
|
Writing |
Create nodes and relationships. |
|
Schema |
Create a constraint ensuring that all nodes with a particular label have a certain property. |
|
Schema |
Create a constraint ensuring that all relationships with a particular relationship type have a certain property. |
|
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. |
|
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. |
|
Schema |
Create a constraint ensuring that the property has the required property type (given by |
|
Schema |
Create a constraint ensuring that the property has the required property type (given by |
|
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. |
|
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. |
|
Schema |
Create a fulltext index on nodes. |
|
Schema |
Create a fulltext index on relationships. |
|
Schema |
Create an index on all nodes with any label. |
|
Schema |
Create an index on all relationships with any relationship type. |
|
Schema |
Create a point index on nodes. |
|
Schema |
Create a point index on relationships. |
|
Schema |
Create a range index on nodes. |
|
Schema |
Create a range index on relationships. |
|
Schema |
Create a text index on nodes. |
|
Schema |
Create a text index on relationships. |
|
Writing |
Delete nodes, relationships or paths. Any node to be deleted must also have all associated relationships explicitly deleted. |
|
Writing |
Delete a node or set of nodes. All associated relationships will automatically be deleted. |
|
Schema |
Drop a constraint using the name. |
|
Schema |
Drop an index using the name. |
|
Writing |
Update data within a list, whether components of a path, or the result of aggregation. |
|
Reading sub-clause |
A sub-clause used to constrain the number of rows in the output. |
|
Importing data |
Use when importing data from CSV files. |
|
Reading |
Specify the patterns to search for in the database. |
|
Reading/Writing |
Ensures that a pattern exists in the graph. Either the pattern already exists, or it needs to be created. |
|
Reading/Writing |
Used in conjunction with |
|
Reading/Writing |
Used in conjunction with |
|
Reading |
Specify the patterns to search for in the database while using |
|
Reading sub-clause |
A sub-clause following |
|
Writing |
Remove properties and labels from nodes and relationships. |
|
Projecting |
Defines what to include in the query result set. |
|
Writing |
Update labels on nodes and properties on nodes and relationships. |
|
Schema |
List constraints in the database, either all or filtered on type.
Also allows |
|
Schema |
List indexes in the database, either all or filtered on fulltext, lookup, point, range, or text indexes.
Also allows |
|
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 |
DBMS |
List procedures, either all or filtered on executable by a user.
Also allows |
|
DBMS |
List configuration settings, either all or filtered on setting name(s).
Also allows |
|
DBMS |
List transactions, either all or filtered on ID.
Also allows |
|
Reading/Writing |
A sub-clause defining from which row to start including the rows in the output. |
|
DBMS |
Terminate transactions with the given IDs. |
|
Set operations |
Combines the result of multiple queries. Duplicates are removed. |
|
Set operations |
Combines the result of multiple queries. Duplicates are retained. |
|
Projecting |
Expands a list into a sequence of rows. |
|
Multiple graphs |
Determines which graph a query, or query part, is executed against. |
|
Hint |
Index hints are used to specify which index, if any, the planner should use as a starting point. |
|
Hint |
Index seek hint instructs the planner to use an index seek for this clause. |
|
Hint |
Join hints are used to enforce a join operation at specified points. |
|
Hint |
Scan hints are used to force the planner to do a label scan (followed by a filtering operation) instead of using an index. |
|
Projecting |
Allows query parts to be chained together, piping the results from one to be used as starting points or criteria in the next. |
|
Reading sub-clause |
A sub-clause used to add constraints to the patterns in a |
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. |
|
Boolean |
Conjunction. |
|
String comparison |
Case-sensitive inclusion search. |
|
Aggregation |
Duplicate removal. |
|
String comparison |
Case-sensitive suffix search. |
|
List |
List element existence check. |
|
Comparison |
Non- |
|
Comparison |
|
|
Boolean |
Negation. |
|
Boolean |
Disjunction. |
|
String comparison |
Case-sensitive prefix search. |
|
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 |
---|---|---|
Numeric |
Returns the absolute value of a |
|
Trigonometric |
Returns the arccosine of a |
|
Predicate |
Returns true if the predicate holds for all elements in the given |
|
Predicate |
Returns true if the predicate holds for at least one element in the given |
|
Trigonometric |
Returns the arcsine of a |
|
Trigonometric |
Returns the arctangent of a |
|
Trigonometric |
Returns the arctangent2 of a set of coordinates in radians. |
|
Aggregating |
Returns the average of a set of values. |
|
Numeric |
Returns the smallest |
|
Scalar |
Returns the first non- |
|
Aggregating |
Returns a list containing the values returned by an expression. |
|
Trigonometric |
Returns the cosine of a |
|
Trigonometric |
Returns the cotangent of a |
|
Aggregating |
Returns the number of values or rows. |
|
Temporal |
Returns the current |
|
Temporal |
Returns a calendar (Year-Month-Day) |
|
Temporal |
Returns a week (Year-Week-Day) |
|
Temporal |
Returns a quarter (Year-Quarter-Day) |
|
Temporal |
Returns an ordinal (Year-Day) |
|
Temporal |
Returns a |
|
Temporal |
Returns a |
|
Temporal |
Returns the current |
|
Temporal |
Returns the current |
|
Temporal |
Returns the current |
|
Temporal |
Returns a |
|
Temporal |
Returns the current |
|
Temporal |
Returns a calendar (Year-Month-Day) |
|
Temporal |
Returns a week (Year-Week-Day) |
|
Temporal |
Returns a quarter (Year-Quarter-Day) |
|
Temporal |
Returns an ordinal (Year-Day) |
|
Temporal |
Returns a |
|
Temporal |
Returns a |
|
Temporal |
Returns a |
|
Temporal |
Returns the current |
|
Temporal |
Returns the current |
|
Temporal |
Returns the current |
|
Temporal |
Returns a |
|
Trigonometric |
Converts radians to degrees. |
|
Temporal |
Returns a |
|
Temporal |
Returns a |
|
Temporal |
Returns a |
|
Temporal |
Returns a |
|
Temporal |
Returns a |
|
Temporal |
Returns a |
|
Logarithmic |
Returns the base of the natural logarithm, |
|
Scalar |
Returns the end |
|
Predicate |
Returns |
|
Logarithmic |
Returns |
|
Numeric |
Returns the largest |
|
Trigonometric |
Returns half the versine of a number. |
|
Scalar |
Returns the first element in a |
|
Scalar |
Returns the id of a |
|
Predicate |
Returns true if the given |
|
Numeric |
Returns |
|
List |
Returns a |
|
List |
Returns a |
|
Scalar |
Returns the last element in a |
|
String |
Returns a |
|
Scalar |
Returns the length of a |
|
Temporal |
Returns the current |
|
Temporal |
Returns a calendar (Year-Month-Day) |
|
Temporal |
Returns a week (Year-Week-Day) |
|
Temporal |
Returns a quarter (Year-Quarter-Day) |
|
Temporal |
Returns an ordinal (Year-Day) |
|
Temporal |
Returns a |
|
Temporal |
Returns a |
|
Temporal |
Returns the current |
|
Temporal |
Returns the current |
|
Temporal |
Returns the current |
|
Temporal |
Returns a |
|
Temporal |
Returns the current |
|
Temporal |
Returns a |
|
Temporal |
Returns a |
|
Temporal |
Returns a |
|
Temporal |
Returns the current |
|
Temporal |
Returns the current |
|
Temporal |
Returns the current |
|
Temporal |
Returns a |
|
Logarithmic |
Returns the natural logarithm of a |
|
Logarithmic |
Returns the common logarithm (base 10) of a |
|
String |
Returns the given |
|
Aggregating |
Returns the maximum value in a set of values. |
|
Aggregating |
Returns the minimum value in a set of values. |
|
List |
Returns a |
|
Predicate |
Returns true if the predicate holds for no element in the given |
|
Aggregating |
Returns the percentile of the given value over a group using linear interpolation. |
|
Aggregating |
Returns the nearest value to the given percentile over a group using a rounding method. |
|
Trigonometric |
Returns the mathematical constant pi. |
|
Spatial |
Returns a 2D |
|
Spatial |
Returns a 3D |
|
Spatial |
Returns a 2D |
|
Spatial |
Returns a 3D |
|
Spatial |
Returns true if the provided |
|
Spatial |
Returns a |
|
Scalar |
Returns a |
|
Trigonometric |
Converts degrees to radians. |
|
Numeric |
Returns a random |
|
Scalar |
Returns a |
|
List |
Returns a |
|
List |
Runs an expression against individual elements of a |
|
List |
Returns a |
|
String |
Returns a |
|
List |
Returns a |
|
String |
Returns a |
|
String |
Returns a |
|
Numeric |
Returns the |
|
Numeric |
Returns the |
|
Numeric |
Returns the |
|
String |
Returns the given |
|
Numeric |
Returns the signum of a number: |
|
Trigonometric |
Returns the sine of a |
|
Predicate |
Returns true if the predicate holds for exactly one of the elements in the given |
|
Scalar |
Returns the number of items in a |
|
Scalar |
Returns the number of paths matching the pattern comprehension. |
|
Scalar |
Returns the number of Unicode characters in a |
|
String |
Returns a |
|
Logarithmic |
Returns the square root of a |
|
Scalar |
Returns the start |
|
Aggregating |
Returns the standard deviation for the given value over a group for a sample of a population. |
|
Aggregating |
Returns the standard deviation for the given value over a group for an entire population. |
|
String |
Returns a substring of the given |
|
Aggregating |
Returns the sum of a set of numeric values. |
|
List |
Returns all but the first element in a |
|
Trigonometric |
Returns the tangent of a |
|
Temporal |
Returns the current |
|
Temporal |
Returns a |
|
Temporal |
Returns a |
|
Temporal |
Returns a |
|
Temporal |
Returns the current |
|
Temporal |
Returns the current |
|
Temporal |
Returns the current |
|
Temporal |
Returns a |
|
Scalar |
Returns the difference, measured in milliseconds, between the current time and midnight, January 1, 1970 UTC. |
|
Scalar |
Converts a |
|
Scalar |
Converts an |
|
Scalar |
Converts a |
|
String |
Returns the given |
|
String |
Converts an |
|
String |
Returns the given |
|
String |
Returns the given |
|
Scalar |
Returns a |
Expressions
Name | Description |
---|---|
A generic conditional expression, similar to if/else statements available in other languages. |
|
Creates a list with the rows returned by a subquery. |
|
Computes the number of results of a subquery. |
|
Evaluates the existence of a subquery. |
|
Verifies that an expression is of a certain type. |
Cypher query options
Name | Type | Description //// Removed in 5.0 |
---|---|---|
Version |
This will force |
|
Runtime |
This will force the query planner to use the interpreted runtime. This is the only option in Neo4j Community Edition. |
|
Runtime |
This will cause the query planner to use the slotted runtime. This is only available in Neo4j Enterprise Edition. |
|
Runtime |
This will cause the query planner to use the pipelined runtime if it supports |
Administrative commands
The following commands are only executable against the system
database:
Command | Admin category | Description |
---|---|---|
Database alias |
Modifies a database alias. |
|
User and role |
Change the password of the user that is currently logged in. |
|
Database |
Modifies the database access mode and / or topology. |
|
Server management |
Modifies the options for a server. |
|
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. |
Database |
Creates a new composite database. |
|
Database |
Creates a new database. |
|
User and role |
Creates new roles. |
|
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. |
|
Server management |
Removes databases from the specified servers. |
|
Privilege |
Denies a database or schema privilege to one or multiple roles. |
|
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. |
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. |
Database |
Deletes a specified database (either standard or composite). |
|
User and role |
Deletes a specified role. |
|
Server management |
Removes a specified server. |
|
User and role |
Deletes a specified user. |
|
Server management |
Enables a specified server. |
|
Privilege |
Assigns a database or schema privilege to one or multiple roles. |
|
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. |
User and role |
Assigns one or multiple roles to one or multiple users. |
|
Server management |
Re-balance databases among all servers. |
|
User and role |
Changes the name of a role. |
|
User and role |
Changes the name of a user. |
|
Privilege |
Removes a database or schema privilege from one or multiple roles. |
|
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. |
User and role |
Removes one or multiple roles from one or multiple users. |
|
Database alias |
Returns information about all aliases, optionally including driver settings. |
|
User and role |
Returns information about all or populated roles, optionally including the assigned users. |
|
Database |
Returns information about a specified database. |
|
Database |
Returns information about all databases. |
|
Server management |
Returns information about all servers. |
|
Database |
Returns information about the default database. |
|
Database |
Returns information about the current users home database. |
|
Privilege |
Returns information about supported privileges. |
|
SHOW [ROLE … | USER … | ALL ] PRIVILEGES [AS [REVOKE] COMMAND[S]] |
Privilege |
Returns information about role, user or all privileges. |
User and role |
Returns information about all users. |
|
Database |
Starts up a specified database. |
|
Database |
Stops a specified database. |
Privilege Actions
Name | Category | Description |
---|---|---|
Database |
Determines whether a user can access a specific database. |
|
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. |
|
DBMS |
Determines whether a user is allowed to perform role, user, database and privilege management. |
|
GRAPH |
Determines whether a user is allowed to perform reads and writes. |
|
DBMS |
Determines whether the user can modify aliases. |
|
DBMS |
Determines whether the user can modify databases and aliases. |
|
DBMS |
Determines whether the user can modify users. |
|
DBMS |
Determines whether the user can assign privileges using the |
|
DBMS |
Determines whether the user can grant roles. |
|
DBMS |
Determines whether the user can create and delete composite databases. |
|
Schema |
Determines whether a user is allowed to create, drop, and list constraints on a specific database. |
|
GRAPH |
Determines whether the user can create a new element (node, relationship or both). |
|
DBMS |
Determines whether the user can create new aliases. |
|
DBMS |
Determines whether the user can create new composite databases. |
|
Schema |
Determines whether a user is allowed to create constraints on a specific database. |
|
DBMS |
Determines whether the user can create new databases and aliases. |
|
Schema |
Determines whether a user is allowed to create indexes on a specific database. |
|
Schema |
Determines whether a user is allowed to create new node labels on a specific database. |
|
Schema |
Determines whether a user is allowed to create new property names on a specific database. |
|
Schema |
Determines whether a user is allowed to create new relationship types on a specific database. |
|
DBMS |
Determines whether the user can create new roles. |
|
DBMS |
Determines whether the user can create new users. |
|
DBMS |
Determines whether the user can create, delete, modify and list aliases. |
|
DBMS |
Determines whether the user can create, delete, and modify databases and aliases. |
|
GRAPH |
Determines whether the user can delete an element (node, relationship or both). |
|
DBMS |
Determines whether the user can delete aliases. |
|
DBMS |
Determines whether the user can delete composite databases. |
|
Schema |
Determines whether a user is allowed to drop constraints on a specific database. |
|
DBMS |
Determines whether the user can delete databases and aliases. |
|
Schema |
Determines whether a user is allowed to drop indexes on a specific database. |
|
DBMS |
Determines whether the user can delete roles. |
|
DBMS |
Determines whether the user can delete users. |
|
DBMS |
Determines whether the user can execute admin procedures. |
|
DBMS |
Determines whether the user gets elevated privileges when executing functions. |
|
DBMS |
Determines whether the user gets elevated privileges when executing procedures. |
|
DBMS |
Determines whether the user can execute functions. |
|
DBMS |
Determines whether the user can execute procedures. |
|
DBMS |
Determines whether a user can impersonate another one and assume their privileges. |
|
Schema |
Determines whether a user is allowed to create, drop, and list indexes on a specific database. |
|
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. |
|
GRAPH |
Determines whether the user can find, read, create and set properties on an element (node, relationship or both). |
|
Schema |
Determines whether a user is allowed to create new labels, types and property names on a specific database. |
|
DBMS |
Determines whether the user can show, assign and remove privileges. |
|
GRAPH |
Determines whether the properties of an element (node, relationship or both) can be read while executing queries on the specified graph. |
|
GRAPH |
Determines whether the user can remove a label from a node using the |
|
DBMS |
Determines whether the user can remove privileges using the |
|
DBMS |
Determines whether the user can revoke roles. |
|
DBMS |
Determines whether the user can rename roles. |
|
DBMS |
Determines whether the user can rename users. |
|
DBMS |
Determines whether the user can create, drop, grant, revoke and show roles. |
|
DBMS |
Determines whether the user can enable, alter, rename, reallocate, deallocate, drop, and show servers. |
|
DBMS |
Determines whether the user can modify the database access mode. |
|
GRAPH |
Determines whether the user can set a label to a node using the SET clause. |
|
DBMS |
Determines whether the user can modify users' passwords and whether those passwords must be changed upon first login. |
|
GRAPH |
Determines whether the user can set a property to an element (node, relationship or both) using the SET clause. |
|
DBMS |
Determines whether the user can modify the home database of users. |
|
DBMS |
Determines whether the user can modify the account status of users. |
|
DBMS |
Determines whether the user is allowed to list aliases. |
|
Schema |
Determines whether the user is allowed to list constraints. |
|
Schema |
Determines whether the user is allowed to list indexes. |
|
DBMS |
Determines whether the user can get information about privileges assigned to users and roles. |
|
DBMS |
Determines whether the user can get information about existing and assigned roles. |
|
DBMS |
Determines whether the user can get information about servers. |
|
DBMS |
Determines whether the user can get information about configuration settings. |
|
Database |
Determines whether a user is allowed to list transactions and queries. |
|
DBMS |
Determines whether the user can get information about existing users. |
|
Database |
Determines whether a user can start up a specific database. |
|
Database |
Determines whether a user can stop a specific running database. |
|
Database |
Determines whether a user is allowed to end running transactions and queries. |
|
Database |
Determines whether a user is allowed to list and end running transactions and queries. |
|
GRAPH |
Determines whether an element (node, relationship or both) can be found and traversed while executing queries on the specified graph. |
|
DBMS |
Determines whether the user can create, drop, modify and show users. |
|
GRAPH |
Determines whether the user can execute write operations on the specified graph. |
Was this page helpful?