Skip to content

Commit e480312

Browse files
committed
updated readme to explicitly mention auto routing support
1 parent c4f52d8 commit e480312

File tree

1 file changed

+14
-12
lines changed

1 file changed

+14
-12
lines changed

README.md

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
- Designed, built and tested under close supervision with the official neo4j driver team
1616
- Validated with [testkit](https://github.com/neo4j-drivers/testkit)
1717
- Fully typed with [psalm](https://psalm.dev/)
18+
- Bolt, HTTP and auto routed drivers available
1819

1920
## See the driver in action
2021

@@ -36,9 +37,9 @@ use Laudis\Neo4j\Authentication\Authenticate;
3637
use Laudis\Neo4j\ClientBuilder;
3738

3839
$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
4243
->withDefaultDriver('bolt')
4344
->build();
4445
```
@@ -50,9 +51,9 @@ Read more about the URLs and how to use them to configure drivers [here](#in-dep
5051
### Step 3: run a transaction
5152

5253
```php
53-
use Laudis\Neo4j\Contracts\UnmanagedTransactionInterface;
54+
use Laudis\Neo4j\Contracts\TransactionInterface;
5455

55-
$result = $client->writeTransaction(static function (UnmanagedTransactionInterface $tsx) {
56+
$result = $client->writeTransaction(static function (TransactionInterface $tsx) {
5657
$result = $tsx->run('MERGE (x {y: "z"}:X) return x');
5758
return $result->first()->get('x')['y'];
5859
});
@@ -377,14 +378,15 @@ Configuration format:
377378

378379
Default configuration:
379380
```
380-
neo4j://localhost:7678?database=neo4j
381+
bolt://localhost:7687?database=neo4j
381382
```
382383

383-
384384
#### Scheme configuration matrix
385385

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

Comments
 (0)