Skip to content

Commit 377d1b0

Browse files
committed
minor documentation improvements
1 parent d150534 commit 377d1b0

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,15 @@
77
[![Test Coverage](https://api.codeclimate.com/v1/badges/275c2269aa54c2c43210/test_coverage)](https://codeclimate.com/github/laudis-technologies/neo4j-php-client/test_coverage)
88
[![MIT License](https://img.shields.io/apm/l/atomic-design-ui.svg?)](https://github.com/laudis-technologies/neo4j-php-client/blob/main/LICENSE)
99

10-
## Effortlessly control to worlds' most powerful graph database
10+
## Control to worlds' most powerful graph database
1111
- Pick and choose your drivers with easy configuration
1212
- Intuitive API
1313
- Extensible
1414
- Designed, built and tested under close supervision with the official neo4j driver team
1515
- Validated with [testkit](https://github.com/neo4j-drivers/testkit)*
1616
- Fully typed with [psalm](https://psalm.dev/)
1717

18-
*(\*) version 2.1 will integrate psalm *
18+
*(\*) version 2.1 will integrate psalm*
1919
## See the driver in action
2020

2121
An example project exists on the [neo4j github](https://github.com/neo4j-examples/movies-neo4j-php-client). It uses Slim and neo4j-php-client to build an API for the classic movie's example of neo4j.
@@ -45,7 +45,7 @@ $client = ClientBuilder::create()
4545

4646
You have now created a client with **bolt, HTTPS and neo4j drivers**. The default driver that the client will use is **bolt**.
4747

48-
Read more about the URLs and how to use them to configure drivers [here]().
48+
Read more about the URLs and how to use them to configure drivers [here](#in-depth-configuration).
4949

5050
### Step 3: run a transaction
5151

@@ -82,28 +82,28 @@ The driver manages transaction functions:
8282
Some examples:
8383

8484
```php
85-
use Laudis\Neo4j\Contracts\UnmanagedTransactionInterface;
85+
use Laudis\Neo4j\Contracts\TransactionInterface;
8686

8787
// Do a simple merge and return the result
88-
$result = $client->writeTransaction(static function (UnmanagedTransactionInterface $tsx) {
88+
$result = $client->writeTransaction(static function (TransactionInterface $tsx) {
8989
$result = $tsx->run('MERGE (x {y: "z"}:X) return x');
9090
return $result->first()->get('x')['y'];
9191
});
9292

9393
// Will result in an error
94-
$client->readTransaction(static function (UnmanagedTransactionInterface $tsx) {
94+
$client->readTransaction(static function (TransactionInterface $tsx) {
9595
$tsx->run('MERGE (x {y: "z"}:X) return x');
9696
});
9797

9898
// This is a poorly designed transaction function
99-
$client->writeTransaction(static function (UnmanagedTransactionInterface $tsx) use ($externalCounter) {
99+
$client->writeTransaction(static function (TransactionInterface $tsx) use ($externalCounter) {
100100
$externalCounter->incrementNodesCreated();
101101
$tsx->run('MERGE (x {y: $id}:X) return x', ['id' => Uuid::v4()]);
102102
});
103103

104104
// This achieves the same effect but is safe in case it should be retried. The function is now idempotent.
105105
$id = Uuid::v4();
106-
$client->writeTransaction(static function (UnmanagedTransactionInterface $tsx) use ($id) {
106+
$client->writeTransaction(static function (TransactionInterface $tsx) use ($id) {
107107
$tsx->run('MERGE (x {y: $id}:X) return x', ['id' => $id]);
108108
});
109109
$externalCounter->incrementNodesCreated();

0 commit comments

Comments
 (0)