|
| 1 | +:description: Information about mandatory GQL features supported by Cypher. |
| 2 | += Supported mandatory GQL features |
| 3 | + |
| 4 | +Unlike optional GQL features, mandatory GQL features are not assigned a GQL feature ID code. |
| 5 | +The below table is instead listed in order of their appearance in the link:https://www.iso.org/standard/76120.html[ISO/IEC 39075:2024(en) GQL Standard]. |
| 6 | + |
| 7 | +[options="header",cols="2a,3a,2a,5a"] |
| 8 | +|=== |
| 9 | +| GQL Standard subclause |
| 10 | +| Description |
| 11 | +| Documentation |
| 12 | +| Comment |
| 13 | + |
| 14 | +| 4.11 |
| 15 | +| Graph pattern matching |
| 16 | +| xref:patterns/index.adoc[] |
| 17 | +| |
| 18 | + |
| 19 | +| 4.13 |
| 20 | +| GQL object types |
| 21 | +| xref:values-and-types/property-structural-constructed.adoc#structural-types[Structural types], xref:values-and-types/property-structural-constructed.adoc#type-synonyms[Types and their synonyms]. |
| 22 | +| Includes: `NODE` (`ANY NODE`, `VERTEX`, `ANY VERTEX`) and `RELATIONSHIP` (`ANY RELATIONSHIP`, `EDGE`, `ANY EDGE`). |
| 23 | + |
| 24 | +| 4.16 |
| 25 | +| Predefined value types |
| 26 | +| xref:values-and-types/property-structural-constructed.adoc#property-types[Property types], xref:values-and-types/property-structural-constructed.adoc#type-synonyms[Types and their synonyms]. |
| 27 | +| Includes: `BOOLEAN` (`BOOL`), `FLOAT`, `INTEGER` (`SIGNED INTEGER`, `INT`), and `STRING` (`VARCHAR`). |
| 28 | + |
| 29 | +Cypher supports the boolean type predicate for `TRUE`, `FALSE`, and `NULL` but does not support the GQL keyword `UNKNOWN`. |
| 30 | + |
| 31 | +| 13.2 |
| 32 | +| <insert statement> |
| 33 | +| xref:clauses/create.adoc#insert-as-synonym-of-create[`INSERT`] |
| 34 | +| |
| 35 | + |
| 36 | +| 13.3 |
| 37 | +| <set statement> |
| 38 | +| xref:clauses/set.adoc[`SET`] |
| 39 | +| GQL’s `SET` has no order dependencies because all right-hand side operations are completed before any assignments occur. |
| 40 | +In Cypher’s `SET`, the order of rows can affect the outcome because changes made during execution may depend on the sequence of assignments. |
| 41 | +The only way to guarantee row order in Neo4j is to use xref:clauses/order-by.adoc[`ORDER BY`]. |
| 42 | + |
| 43 | +| 13.4 |
| 44 | +| <remove statement> |
| 45 | +| xref:clauses/remove.adoc[`REMOVE`] |
| 46 | +| |
| 47 | + |
| 48 | +| 13.5 |
| 49 | +| <delete statement> |
| 50 | +| xref:clauses/delete.adoc[`DELETE`] |
| 51 | +| |
| 52 | + |
| 53 | +| 14.4 |
| 54 | +| <match statement> |
| 55 | +| xref:clauses/match.adoc[`MATCH`], xref:clauses/optional-match.adoc[`OPTIONAL MATCH`] |
| 56 | +| |
| 57 | + |
| 58 | +| 14.9 |
| 59 | +| <order by and page statement> |
| 60 | +| xref:clauses/skip.adoc[`SKIP`] |
| 61 | +| Cypher only supports `SKIP`, which is a GQL-supported synonym to `OFFSET`. |
| 62 | + |
| 63 | + |
| 64 | +| 14.10 |
| 65 | +| <primitive result statement> |
| 66 | +| xref:clauses/finish.adoc[`FINISH`] |
| 67 | +| |
| 68 | + |
| 69 | +| 14.11 |
| 70 | +| <return statement> |
| 71 | +| xref:clauses/return.adoc[`RETURN`] |
| 72 | +| |
| 73 | + |
| 74 | +| 15.1 |
| 75 | +| <call procedure statement> and <procedure call> |
| 76 | +| xref:clauses/call.adoc[`CALL` procedures], xref:subqueries/call-subquery.adoc[`CALL` subqueries]. |
| 77 | +| GQL defines an `OPTIONAL CALL` statement, enabling optional procedure and subquery calling. |
| 78 | +This is not available in Cypher. |
| 79 | + |
| 80 | +| 15.2 |
| 81 | +| <inline procedure call> |
| 82 | +| xref:subqueries/call-subquery.adoc[`CALL` subqueries]. |
| 83 | +| GQL either imports variables implicitly, or explicitly using a variable scope clause. |
| 84 | +In Cypher, `CALL` subqueries require an explicit importing `WITH` clause. |
| 85 | + |
| 86 | +| 15.3 |
| 87 | +| <named procedure call> |
| 88 | +| xref:clauses/call.adoc[`CALL` procedure] |
| 89 | +| |
| 90 | + |
| 91 | +| 16.2 |
| 92 | +| <limit clause> |
| 93 | +| xref:clauses/limit.adoc[`LIMIT`] |
| 94 | +| |
| 95 | + |
| 96 | +| 16.4 |
| 97 | +| <graph pattern> |
| 98 | +| xref:patterns/reference.adoc#graph-patterns[Graph patterns] |
| 99 | +| |
| 100 | + |
| 101 | +| 16.5 |
| 102 | +| <insert graph pattern> |
| 103 | +| xref:clauses/create.adoc#[`CREATE`] |
| 104 | +| |
| 105 | + |
| 106 | +| 16.6 |
| 107 | +| <order by clause> |
| 108 | +| xref:clauses/order-by.adoc[`ORDER-BY`] |
| 109 | +| |
| 110 | + |
| 111 | +| 16.7 |
| 112 | +| <path pattern expression> |
| 113 | +| xref:patterns/reference.adoc#path-patterns[Path patterns] |
| 114 | +| |
| 115 | + |
| 116 | +| 16.8 |
| 117 | +| <label expression> |
| 118 | +| xref:patterns/reference.adoc#label-expressions[Label expressions] |
| 119 | +| |
| 120 | + |
| 121 | +| 16.9 |
| 122 | +| <path variable reference> |
| 123 | +| xref:patterns/reference.adoc[Patterns -> Syntax and semantics] |
| 124 | +| |
| 125 | + |
| 126 | +| 16.11 |
| 127 | +| <graph pattern quantifier> |
| 128 | +| xref:patterns/reference.adoc#quantifiers[Quantifiers] |
| 129 | +| |
| 130 | + |
| 131 | +| 16.17 |
| 132 | +| <sort specification list> |
| 133 | +| xref:clauses/order-by.adoc#order-nodes-in-descending-order[Order results in ascending or descending order] |
| 134 | +| |
| 135 | + |
| 136 | +| 16.19 |
| 137 | +| <offset clause> |
| 138 | +| xref:clauses/skip.adoc[`SKIP`] |
| 139 | +| Cypher only supports `SKIP` , which is a GQL-supported synonym to `OFFSET`. |
| 140 | + |
| 141 | +| 19.3 |
| 142 | +| <comparison predicate> |
| 143 | +| xref:syntax/operators.adoc##query-operators-comparison[Comparison operators] |
| 144 | +| |
| 145 | + |
| 146 | +| 19.4 |
| 147 | +| <exists predicate> |
| 148 | +| xref:functions/predicate.adoc#function-exists[`exists()`] |
| 149 | +| |
| 150 | + |
| 151 | +| 19.5 |
| 152 | +| <null predicate> |
| 153 | +| xref:values-and-types/type-predicate.adoc#type-predicate-null[Type predicate expressions for `NULL`] |
| 154 | +| |
| 155 | + |
| 156 | +| 19.6 |
| 157 | +| <value type predicate> |
| 158 | +| xref:values-and-types/type-predicate.adoc#[] |
| 159 | +| |
| 160 | + |
| 161 | +| 19.7 |
| 162 | +| <normalized predicate> |
| 163 | +| xref:syntax/operators.adoc#match-string-is-normalized[`IS NORMALIZED`], xref:syntax/operators.adoc#match-string-is-not-normalized[`IS NOT NORMALIZED`] |
| 164 | +| |
| 165 | + |
| 166 | +| 20.2 |
| 167 | +| <value expression primary> |
| 168 | +| xref:queries/expressions.adoc[] |
| 169 | +| |
| 170 | + |
| 171 | +| 20.3 |
| 172 | +| <value specification> |
| 173 | +| |
| 174 | +| GQL defines the `SESSION_USER` value expression, which enables accessing a user’s username within a query. |
| 175 | +In Cypher, current user details can be seen using the link:{neo4j-docs-base-uri}/operations-manual/{page-version}/authentication-authorization/manage-users/#access-control-current-users[`SHOW CURRENT USER` command]. |
| 176 | + |
| 177 | +| 20.7 |
| 178 | +| <case expression> |
| 179 | +| xref:queries/case.adoc[`CASE`], xref:functions/scalar.adoc#functions-nullIf[`nullIf()`], xref:functions/scalar.adoc#functions-coalesce[`coalesce()`] |
| 180 | +| |
| 181 | + |
| 182 | +| 20.9 |
| 183 | +| <aggregate function> |
| 184 | +| xref:functions/aggregating.adoc#functions-avg[`avg()`], xref:functions/aggregating.adoc#functions-count[`count()`], xref:functions/aggregating.adoc#functions-max[`max`], xref:functions/aggregating.adoc#functions-mind[`min()`], xref:functions/aggregating.adoc#functions-sum[`sum()`] |
| 185 | +| Cypher and GQL handle `NULL` values differently for the `sum()` function when queries return 0 rows. |
| 186 | +For example, `RETURN sum(<expr>)` on an empty table returns `NULL` in GQL, but in Cypher it returns `0`. |
| 187 | + |
| 188 | +| 20.11 |
| 189 | +| <property reference> |
| 190 | +| xref:queries/concepts.adoc[Core concepts] |
| 191 | +| |
| 192 | + |
| 193 | +| 20.21 |
| 194 | +| <numeric value expression> |
| 195 | +| xref:syntax/operators.adoc#query-operators-mathematical[Mathematical operators] |
| 196 | +| |
| 197 | + |
| 198 | +| 20.22 |
| 199 | +| <numeric value function> |
| 200 | +| xref:functions/scalar.adoc#functions-char_length[`char_length()`], xref:functions/scalar.adoc#functions-character_length[`character_length()`] |
| 201 | +| |
| 202 | + |
| 203 | +| 20.23 |
| 204 | +| <string value expression> |
| 205 | +| xref:syntax/operators.adoc#syntax-concatenating-two-strings-doublebar[`STRING` concatenation operator (`\|\|`)] |
| 206 | +| |
| 207 | + |
| 208 | +| 20.24 |
| 209 | +| <character string function> |
| 210 | +| xref:functions/string.adoc#functions-left[`left()`], xref:functions/string.adoc#functions-lower[`lower()`], xref:functions/string.adoc#functions-normalize[`normalize()`], xref:functions/string.adoc#functions-right[`right()`], xref:functions/string.adoc#functions-trim[`trim()`], xref:functions/string.adoc#functions-upper[`upper()`] |
| 211 | +| In GQL, `TRIM()` removes only space characters. |
| 212 | +In Cypher, `trim()` removes any whitespace character. |
| 213 | + |
| 214 | +| 21.1 |
| 215 | +| Names and variables |
| 216 | +| xref:syntax/index.adoc[] |
| 217 | +| Cypher supports GQL’s lexical elements, with the following caveats: |
| 218 | + |
| 219 | +* GQL allows for extended parameter identifiers. |
| 220 | +For example: `RETURN $0hello` is allowed in GQL but not Cypher. |
| 221 | +* GQL allows identifiers that are not variables to be delimited with both backticks and quotes. |
| 222 | +Cypher only allows backticks. |
| 223 | +For example: `MATCH (n) RETURN n."a prop"` is allowed in GQL but not Cypher. |
| 224 | +
|
| 225 | +| 22.15 |
| 226 | +| Grouping operations |
| 227 | +| xref:functions/aggregating.adoc##counting_with_and_without_duplicates[Counting with and without duplicates] |
| 228 | +| |
| 229 | + |
| 230 | +|=== |
| 231 | + |
0 commit comments