21
21
use Laudis \Neo4j \BoltFactory ;
22
22
use Laudis \Neo4j \Common \ConnectionConfiguration ;
23
23
use Laudis \Neo4j \Contracts \ConnectionInterface ;
24
+ use Laudis \Neo4j \Databags \BookmarkHolder ;
24
25
use Laudis \Neo4j \Databags \DatabaseInfo ;
25
26
use Laudis \Neo4j \Databags \DriverConfiguration ;
26
27
use Laudis \Neo4j \Enum \AccessMode ;
@@ -270,14 +271,14 @@ public function discard(?int $qid): void
270
271
*
271
272
* @return BoltMeta
272
273
*/
273
- public function run (string $ text , array $ parameters , ?string $ database , ?float $ timeout ): array
274
+ public function run (string $ text , array $ parameters , ?string $ database , ?float $ timeout, BookmarkHolder $ holder ): array
274
275
{
275
276
if (!str_starts_with ($ this ->serverState , 'TX_ ' ) || str_starts_with ($ this ->getServerVersion (), '3 ' )) {
276
277
$ this ->consumeResults ();
277
278
}
278
279
279
280
try {
280
- $ extra = $ this ->buildRunExtra ($ database , $ timeout );
281
+ $ extra = $ this ->buildRunExtra ($ database , $ timeout, $ holder );
281
282
282
283
$ tbr = $ this ->protocol ()->run ($ text , $ parameters , $ extra );
283
284
@@ -398,7 +399,7 @@ public function __destruct()
398
399
}
399
400
}
400
401
401
- private function buildRunExtra (?string $ database , ?float $ timeout ): array
402
+ private function buildRunExtra (?string $ database , ?float $ timeout, BookmarkHolder $ holder ): array
402
403
{
403
404
$ extra = [];
404
405
if ($ database ) {
@@ -408,6 +409,10 @@ private function buildRunExtra(?string $database, ?float $timeout): array
408
409
$ extra ['tx_timeout ' ] = (int ) ($ timeout * 1000 );
409
410
}
410
411
412
+ if (!$ holder ->getBookmark ()->isEmpty ()) {
413
+ $ extra ['bookmarks ' ] = $ holder ->getBookmark ()->values ();
414
+ }
415
+
411
416
return $ extra ;
412
417
}
413
418
0 commit comments