You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
| * Feature GD01 implies compliance with GQL feature GT01, "Explicit transaction commands", which states that conforming languages shall contain the following transaction control commands: `START TRANSACTION`, `ROLLBACK`, and `COMMIT`.
105
+
These are not present in Cypher.
106
+
However, Neo4j offers transaction management through the link:{neo4j-docs-base-uri}/create-applications[driver] transaction API.
107
+
Cypher Shell also offers specific link:{neo4j-docs-base-uri}/operations-manual/current/tools/cypher-shell/#cypher-shell-commands[commands] to manage transactions.
108
+
* Feature GD01 implies conformance to GQL's `<set-statement>` (subclause 13.3).
109
+
GQL’s `SET` has no order dependencies because all right-hand side operations are completed before any assignments occur.
110
+
However, In Cypher’s `SET`, the order of rows can affect the outcome because changes made during execution may depend on the sequence of assignments.
111
+
The only way to guarantee row order in Neo4j is to use xref:clauses/order-by.adoc[`ORDER BY`].
<1> xref:functions/aggregating.adoc#functions-collect[Collect] all returned `Movie` nodes into a `LIST<NODE>`.
192
192
<2> `batchSize` defines the number of nodes in `moviesList` to be processed at once.
193
193
Because vector embeddings can be very large, a larger batch size may require significantly more memory on the Neo4j server.
194
194
Too large a batch size may also exceed the provider's threshold.
195
195
<3> Process `Movie` nodes in increments of `batchSize`.
196
+
The end range `total-1` is due to `range` being inclusive on both ends.
196
197
<4> A xref:subqueries/subqueries-in-transactions.adoc[`CALL` subquery] executes a separate transaction for each batch.
197
198
Note that this `CALL` subquery uses a xref:subqueries/call-subquery.adoc#variable-scope-clause[variable scope clause].
198
199
<5> `batch` is a list of strings, each being the concatenation of `title` and `plot` of one movie.
199
200
<6> The procedure sets `vector` as value for the property named `embedding` for the node at position `batchStart + index` in the `moviesList`.
200
201
<7> Set to `1` the amount of batches to be processed at once.
202
+
For more information on concurrency in transactions, see xref:subqueries/subqueries-in-transactions.adoc#concurrent-transactions[`CALL` subqueries -> Concurrent transactions]).
201
203
202
204
[NOTE]
203
205
This example may not scale to larger datasets, as `collect(m)` requires the whole result set to be loaded in memory.
The paths matched by a xref:patterns/fixed-length-patterns.adoc#path-patterns[path pattern] can be restricted to only the shortest (by number of hops) by including the keyword `SHORTEST k`, where `k` is the number of paths to match, and can be either an `INTEGER` literal or, as of Neo4j 2025.02, a parameter which resolves to an `INTEGER`.
67
+
The paths matched by a xref:patterns/fixed-length-patterns.adoc#path-patterns[path pattern] can be restricted to only the shortest (by number of hops) by including the keyword `SHORTEST k`, where `k` is the number of paths to match, and can be either an `INTEGER` literal or, as of Neo4j 2025.03, a parameter which resolves to an `INTEGER`.
68
68
For example, the following example uses `SHORTEST 1` to return the length of the shortest path between `Worcester Shrub Hill` and `Bromsgrove`:
0 commit comments