Skip to content

Commit 02c9d17

Browse files
committed
call pull_all immediatly when running neo4j 3
1 parent b98c989 commit 02c9d17

File tree

3 files changed

+22
-5
lines changed

3 files changed

+22
-5
lines changed

docker-compose.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ services:
6060
neo4j:
6161
networks:
6262
- neo4j
63-
image: neo4j:4.4-enterprise
63+
image: neo4j:3.5-enterprise
6464
healthcheck:
6565
test: "wget -q --method=HEAD http://localhost:7474 || exit 1"
6666
interval: 30s
@@ -76,7 +76,7 @@ services:
7676
env_file:
7777
- .env
7878
core1:
79-
image: neo4j:4.4-enterprise
79+
image: neo4j:3.5-enterprise
8080
healthcheck:
8181
test: "wget -q --method=HEAD http://localhost:7474 || exit 1"
8282
interval: 30s
@@ -97,7 +97,7 @@ services:
9797
- .env
9898

9999
core2:
100-
image: neo4j:4.4-enterprise
100+
image: neo4j:3.5-enterprise
101101
healthcheck:
102102
test: "wget -q --method=HEAD http://localhost:7474 || exit 1"
103103
interval: 30s
@@ -118,7 +118,7 @@ services:
118118
- .env
119119

120120
core3:
121-
image: neo4j:4.4-enterprise
121+
image: neo4j:3.5-enterprise
122122
healthcheck:
123123
test: "wget -q --method=HEAD http://localhost:7474 || exit 1"
124124
interval: 30s
@@ -139,7 +139,7 @@ services:
139139
- .env
140140

141141
readreplica1:
142-
image: neo4j:4.4-enterprise
142+
image: neo4j:3.5-enterprise
143143
healthcheck:
144144
test: "wget -q --method=HEAD http://localhost:7474 || exit 1"
145145
interval: 30s

src/Bolt/BoltResult.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313

1414
namespace Laudis\Neo4j\Bolt;
1515

16+
use Laudis\Neo4j\Enum\ConnectionProtocol;
1617
use function array_key_exists;
1718
use function array_splice;
1819
use Bolt\protocol\V4;
@@ -44,6 +45,9 @@ public function __construct(BoltConnection $connection, int $fetchSize, int $qid
4445
$this->fetchSize = $fetchSize;
4546
$this->qid = $qid;
4647
$this->connection->incrementOwner();
48+
if ($this->connection->getProtocol() === ConnectionProtocol::BOLT_V3()) {
49+
$this->pull();
50+
}
4751
}
4852

4953
public function getFetchSize(): int

tests/Integration/TransactionIntegrationTest.php

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -397,4 +397,17 @@ public function testCorrectConnectionReuse(string $alias): void
397397
/** @psalm-suppress MixedArgument */
398398
self::assertCount(3, $cache[$key]);
399399
}
400+
401+
/**
402+
* @dataProvider connectionAliases
403+
*
404+
* @doesNotPerformAssertions
405+
*/
406+
public function testTransactionRunNoConsumeResult(string $alias): void
407+
{
408+
$tsx = $this->getClient()->beginTransaction([], $alias);
409+
$tsx->run('MATCH (x) RETURN x');
410+
$tsx->run('MATCH (x) RETURN x');
411+
$tsx->commit();
412+
}
400413
}

0 commit comments

Comments
 (0)