File tree Expand file tree Collapse file tree 4 files changed +33
-0
lines changed Expand file tree Collapse file tree 4 files changed +33
-0
lines changed Original file line number Diff line number Diff line change @@ -273,6 +273,15 @@ Closing a driver will immediately shut down all connections in the pool.
273273 The transformer function must **not ** return the
274274 :class: `neo4j.Result ` itself.
275275
276+
277+ .. warning ::
278+
279+ N.B. the driver might retry the underlying transaction so the
280+ transformer might get invoked more than once (with different
281+ :class: `neo4j.Result ` objects).
282+ Therefore, it needs to be idempotent (i.e., have the same
283+ effect, regardless if called once or many times).
284+
276285 Example transformer that checks that exactly one record is in the
277286 result stream, then returns the record and the result summary::
278287
Original file line number Diff line number Diff line change @@ -255,6 +255,14 @@ Closing a driver will immediately shut down all connections in the pool.
255255 The transformer function must **not ** return the
256256 :class: `neo4j.AsyncResult ` itself.
257257
258+ .. warning ::
259+
260+ N.B. the driver might retry the underlying transaction so the
261+ transformer might get invoked more than once (with different
262+ :class: `neo4j.AsyncResult ` objects).
263+ Therefore, it needs to be idempotent (i.e., have the same
264+ effect, regardless if called once or many times).
265+
258266 Example transformer that checks that exactly one record is in the
259267 result stream, then returns the record and the result summary::
260268
Original file line number Diff line number Diff line change @@ -686,6 +686,14 @@ async def example(driver: neo4j.AsyncDriver) -> int:
686686 The transformer function must **not** return the
687687 :class:`neo4j.AsyncResult` itself.
688688
689+ .. warning::
690+
691+ N.B. the driver might retry the underlying transaction so the
692+ transformer might get invoked more than once (with different
693+ :class:`neo4j.AsyncResult` objects).
694+ Therefore, it needs to be idempotent (i.e., have the same
695+ effect, regardless if called once or many times).
696+
689697 Example transformer that checks that exactly one record is in the
690698 result stream, then returns the record and the result summary::
691699
Original file line number Diff line number Diff line change @@ -684,6 +684,14 @@ def example(driver: neo4j.Driver) -> int:
684684 The transformer function must **not** return the
685685 :class:`neo4j.Result` itself.
686686
687+ .. warning::
688+
689+ N.B. the driver might retry the underlying transaction so the
690+ transformer might get invoked more than once (with different
691+ :class:`neo4j.Result` objects).
692+ Therefore, it needs to be idempotent (i.e., have the same
693+ effect, regardless if called once or many times).
694+
687695 Example transformer that checks that exactly one record is in the
688696 result stream, then returns the record and the result summary::
689697
You can’t perform that action at this time.
0 commit comments