File tree 4 files changed +33
-0
lines changed
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.
273
273
The transformer function must **not ** return the
274
274
:class: `neo4j.Result ` itself.
275
275
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
+
276
285
Example transformer that checks that exactly one record is in the
277
286
result stream, then returns the record and the result summary::
278
287
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.
255
255
The transformer function must **not ** return the
256
256
:class: `neo4j.AsyncResult ` itself.
257
257
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
+
258
266
Example transformer that checks that exactly one record is in the
259
267
result stream, then returns the record and the result summary::
260
268
Original file line number Diff line number Diff line change @@ -686,6 +686,14 @@ async def example(driver: neo4j.AsyncDriver) -> int:
686
686
The transformer function must **not** return the
687
687
:class:`neo4j.AsyncResult` itself.
688
688
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
+
689
697
Example transformer that checks that exactly one record is in the
690
698
result stream, then returns the record and the result summary::
691
699
Original file line number Diff line number Diff line change @@ -684,6 +684,14 @@ def example(driver: neo4j.Driver) -> int:
684
684
The transformer function must **not** return the
685
685
:class:`neo4j.Result` itself.
686
686
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
+
687
695
Example transformer that checks that exactly one record is in the
688
696
result stream, then returns the record and the result summary::
689
697
You can’t perform that action at this time.
0 commit comments