15
15
- Designed, built and tested under close supervision with the official neo4j driver team
16
16
- Validated with [ testkit] ( https://github.com/neo4j-drivers/testkit )
17
17
- Fully typed with [ psalm] ( https://psalm.dev/ )
18
+ - Bolt, HTTP and auto routed drivers available
18
19
19
20
## See the driver in action
20
21
@@ -36,9 +37,9 @@ use Laudis\Neo4j\Authentication\Authenticate;
36
37
use Laudis\Neo4j\ClientBuilder;
37
38
38
39
$client = ClientBuilder::create()
39
- ->withDriver('bolt', 'bolt+s://user:password@localhost')
40
- ->withDriver('https', 'https://test.com', Authenticate::basic('user', 'password'))
41
- ->withDriver('neo4j', 'neo4j://neo4j.test.com?database=my-database', Authenticate::kerberos('token'))
40
+ ->withDriver('bolt', 'bolt+s://user:password@localhost') // creates a bolt driver
41
+ ->withDriver('https', 'https://test.com', Authenticate::basic('user', 'password')) // creates an http driver
42
+ ->withDriver('neo4j', 'neo4j://neo4j.test.com?database=my-database', Authenticate::kerberos('token')) // creates an auto routed driver
42
43
->withDefaultDriver('bolt')
43
44
->build();
44
45
```
@@ -50,9 +51,9 @@ Read more about the URLs and how to use them to configure drivers [here](#in-dep
50
51
### Step 3: run a transaction
51
52
52
53
``` php
53
- use Laudis\Neo4j\Contracts\UnmanagedTransactionInterface ;
54
+ use Laudis\Neo4j\Contracts\TransactionInterface ;
54
55
55
- $result = $client->writeTransaction(static function (UnmanagedTransactionInterface $tsx) {
56
+ $result = $client->writeTransaction(static function (TransactionInterface $tsx) {
56
57
$result = $tsx->run('MERGE (x {y: "z"}:X) return x');
57
58
return $result->first()->get('x')['y'];
58
59
});
@@ -377,14 +378,15 @@ Configuration format:
377
378
378
379
Default configuration:
379
380
```
380
- neo4j ://localhost:7678 ?database=neo4j
381
+ bolt ://localhost:7687 ?database=neo4j
381
382
```
382
383
383
-
384
384
#### Scheme configuration matrix
385
385
386
- | driver| scheme| valid certificate | self-signed certificate |
387
- | -------| -------| -------------------| -----------------------------------------------|
388
- | neo4j | neo4j | neo4j+s | neo4j+ssc |
389
- | bolt | bolt | bolt+s | bolt+ssc |
390
- | http | http | https | configured through PSR Client implementation |
386
+ This library supports three drivers: bolt, HTTP and neo4j. The scheme part of the url determines the driver.
387
+
388
+ | driver| scheme| valid certificate | self-signed certificate | function |
389
+ | -------| -------| -------------------| -----------------------------------------------| -------------------------------|
390
+ | neo4j | neo4j | neo4j+s | neo4j+ssc | Client side routing over bolt |
391
+ | bolt | bolt | bolt+s | bolt+ssc | Single server over bolt |
392
+ | http | http | https | configured through PSR Client implementation | Single server over HTTP |
0 commit comments