Supported optional GQL features

This page lists the optional GQL features Cypher® is either fully or partially conformant with.

Optional GQL features are assigned a feature ID code. These codes order the features in the table below.

GQL Feature ID Description Documentation Comment

G002

Different-edges match mode

The semantic for this feature is the default Cypher semantic.

G004

Path variables

G016

Any path search

ANY

G017

All shortest path search

G018

Any shortest path search

ANY

G019

Counted shortest path search

G020

Counted shortest group search

G035

Quantified paths

G036

Quantified edges

G043

Complete full edge patterns

Note the following:

  • Cypher supports GQL’s directed forms (e.g. ()-[r]->()) but not its tilde forms (e.g. ()~[r]~>()).

  • Cypher does not support GQL’s ()<-->() (matches any direct edge regardless of its direction). In Cypher, this is written as ()--().

  • In GQL ()--() additionally matches undirected edges. Neo4j does not implement undirected relationships.

G050

Parenthesized path pattern: WHERE clause

G051

Parenthesized path pattern: non-local predicate

G060

Bounded graph pattern quantifier

G061

Unbounded graph pattern quantifier

G074

Label expressions: wildcard label

GA06

Value type predicates

GA07

Ordering by discarded binding variables

GB01

Long identifiers

GB03

Double solidus comments

GD02

Graph label set changes

SET

GD04

DELETE with simple expression

GE07

Boolean XOR

Cypher supports XOR, but with different operator precedence than GQL. Equivalent behavior is achieved when expressions are explicitly parenthesized.

GF01

Enhanced numeric functions

abs(), floor(), sqrt(). GQL uses MOD() for modulus. Cypher uses the % operator instead.

GQL supports CEILING() as a synonym for the CEIL() function. Cypher supports ceil().

GF02

Trigonometric functions

GF03

Logarithmic functions

Note the following exceptions:

GF05

Multi-character trim functions

GF06

Explicit TRIM function

In GQL, TRIM() removes only space characters. In Cypher, trim() removes any whitespace character.

GG01

Graph with open graph type

GL01

Hexadecimal literals

GL02

Octal literals

GP01

Inline procedure

GP03

Inline procedure with explicit nested variable scope

GP04

Named procedure calls

GQ01

USE graph clause

USE

Cypher’s USE clause supports static graph references (e.g. USE myComposite.myGraph)and dynamic graph references (e.g. USE graph.byName(<expression>)). However, Cypher does not support GQL’s full graph reference syntax. For example, GQL’s graph reference values CURRENT_GRAPH and CURRENT_PROPERTY_GRAPH cannot be used in Cypher.

GQ03

Composite query: UNION

GQ13

ORDER BY and page statement: LIMIT

Cypher requires using the WITH clause, which GQL does not.

GQ14

Complex expressions in sort keys

GQ16

Pre-projection aliases in sort keys

GQ22

EXISTS predicate: multiple MATCH

GV39

Temporal types: date, local datetime, and local time support

Note the following exceptions:

  • GQL defines a parameterless version of the date() function not in Cypher: CURRENT_DATE.

  • * GQL defines the literal DATE. Cypher instead uses the date() function. GQL’s LOCAL_TIME() function is equivalent to Cypher’s localtime() function. GQL also defines a parameterless version of the function not in Cypher: LOCAL_TIME.

  • GQL’s LOCAL_DATETIME() function is equivalent to Cypher’s localdatetime() function. GQL also defines a parameterless version of the function not in Cypher: LOCAL_DATETIME.

GV40

Temporal types: zoned datetime and zoned time support

Note the following exceptions:

  • GQL’s ZONED_TIME() function is equivalent to Cypher’s time() function. GQL also defines a parameterless version of the function not in Cypher: CURRENT_TIME.

  • GQL’s ZONED_DATETIME() function is equivalent to Cypher’s datetime() function. GQL also defines a parameterless version of the function not in Cypher: CURRENT_TIMESTAMP.

GV50

List value types

GV55

Path value types

GV66

Open dynamic unions

GV67

Closed dynamic unions

GV70

Immaterial value types: null type support (null)

GV71

Immaterial value types: empty type support (NOTHING)]

Cypher and GQL sometimes name functions differently and, as a result, several Cypher functions offer the same (or very similar) functionality to their GQL counterpart. For more information, see the page Optional GQL features and analogous Cypher.