@@ -37,7 +37,12 @@ public function run(string $statement, iterable $parameters = [], ?string $alias
3737
3838 public function runStatement (Statement $ statement , ?string $ alias = null ): ?SummarizedResult
3939 {
40- return $ this ->handler ->handle (fn (Statement $ statement ) => $ this ->client ->runStatement ($ statement , $ alias ), $ statement , $ alias );
40+ return $ this ->handler ->handle (
41+ fn (Statement $ statement ) => $ this ->client ->runStatement ($ statement , $ alias ),
42+ $ statement ,
43+ $ alias ,
44+ null
45+ );
4146 }
4247
4348 public function runStatements (iterable $ statements , ?string $ alias = null ): CypherList
@@ -50,14 +55,17 @@ public function runStatements(iterable $statements, ?string $alias = null): Cyph
5055 return CypherList::fromIterable ($ tbr );
5156 }
5257
53- public function beginTransaction (?iterable $ statements = null , ?string $ alias = null , ?TransactionConfiguration $ config = null ): UnmanagedTransactionInterface
54- {
58+ public function beginTransaction (
59+ ?iterable $ statements = null ,
60+ ?string $ alias = null ,
61+ ?TransactionConfiguration $ config = null
62+ ): UnmanagedTransactionInterface {
5563 $ tsx = new SymfonyTransaction ($ this ->client ->beginTransaction (null , $ alias , $ config ), $ this ->handler , $ alias );
5664
57- $ runHandler = fn (Statement $ statement ): CypherList => $ tsx ->runStatement ($ statement );
65+ $ runHandler = fn (Statement $ statement ): CypherList => $ tsx ->runStatement ($ statement );
5866
5967 foreach (($ statements ?? []) as $ statement ) {
60- $ this ->handler ->handle ($ runHandler , $ statement , $ alias );
68+ $ this ->handler ->handle ($ runHandler , $ statement , $ alias, null );
6169 }
6270
6371 return $ tsx ;
@@ -68,24 +76,30 @@ public function getDriver(?string $alias): DriverInterface
6876 return $ this ->client ->getDriver ($ alias );
6977 }
7078
71- public function writeTransaction (callable $ tsxHandler , ?string $ alias = null , ?TransactionConfiguration $ config = null )
72- {
79+ public function writeTransaction (
80+ callable $ tsxHandler ,
81+ ?string $ alias = null ,
82+ ?TransactionConfiguration $ config = null
83+ ) {
7384 $ sessionConfig = SessionConfiguration::default ()->withAccessMode (AccessMode::READ ());
7485 $ session = $ this ->client ->getDriver ($ alias )->createSession ($ sessionConfig );
7586
7687 return TransactionHelper::retry (
77- fn () => new SymfonyTransaction ($ session ->beginTransaction ([], $ config ), $ this ->handler , $ alias ),
88+ fn () => new SymfonyTransaction ($ session ->beginTransaction ([], $ config ), $ this ->handler , $ alias ),
7889 $ tsxHandler
7990 );
8091 }
8192
82- public function readTransaction (callable $ tsxHandler , ?string $ alias = null , ?TransactionConfiguration $ config = null )
83- {
93+ public function readTransaction (
94+ callable $ tsxHandler ,
95+ ?string $ alias = null ,
96+ ?TransactionConfiguration $ config = null
97+ ) {
8498 $ sessionConfig = SessionConfiguration::default ()->withAccessMode (AccessMode::WRITE ());
8599 $ session = $ this ->client ->getDriver ($ alias )->createSession ($ sessionConfig );
86100
87101 return TransactionHelper::retry (
88- fn () => new SymfonyTransaction ($ session ->beginTransaction ([], $ config ), $ this ->handler , $ alias ),
102+ fn () => new SymfonyTransaction ($ session ->beginTransaction ([], $ config ), $ this ->handler , $ alias ),
89103 $ tsxHandler
90104 );
91105 }
0 commit comments