Skip to content

Commit 705830f

Browse files
committed
fixed regression in result set
1 parent 5bf91e7 commit 705830f

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

src/Types/AbstractCypherSequence.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -510,6 +510,12 @@ public function withCacheLimit(int $cacheLimit): self
510510
private function setupCache(): void
511511
{
512512
$generator = $this->getGenerator();
513+
514+
if (count($this->cache) % $this->cacheLimit === 0) {
515+
$this->cache = [];
516+
$this->keyCache = [];
517+
}
518+
513519
if ($this->cache === [] && $generator->valid()) {
514520
$this->cache[$generator->key()] = $generator->current();
515521
$this->keyCache[] = $generator->key();

tests/Integration/BasicDriverTest.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,6 @@ public function testFullWalk(string $connection): void
5757
{
5858
$driver = Driver::create($connection);
5959

60-
global $session;
61-
6260
$session = $driver->createSession();
6361

6462
$session->run('MATCH (x) DETACH DELETE x');

0 commit comments

Comments
 (0)