@@ -103,7 +103,7 @@ import neo4j from 'https://cdn.jsdelivr.net/npm/
[email protected] /lib/browser/n
103
103
```
104
104
105
105
It is not required to explicitly close the driver on a web page. Web browser should gracefully close all open
106
- WebSockets when the page is unloaded. However, driver instance should be explicitly closed when it's lifetime
106
+ WebSockets when the page is unloaded. However, driver instance should be explicitly closed when its lifetime
107
107
is not the same as the lifetime of the web page:
108
108
109
109
``` javascript
@@ -116,13 +116,13 @@ driver.close() // returns a Promise
116
116
117
117
``` javascript
118
118
// Create a driver instance, for the user `neo4j` with password `password`.
119
- // It should be enough to have a single driver per database per application.
119
+ // It should be enough to have a single driver per DBMS per application.
120
120
var driver = neo4j .driver (
121
121
' neo4j://localhost' ,
122
122
neo4j .auth .basic (' neo4j' , ' password' )
123
123
)
124
124
125
- // Close the driver when application exits.
125
+ // Close the driver when the application exits.
126
126
// This closes all used network connections.
127
127
await driver .close ()
128
128
```
@@ -295,15 +295,14 @@ rxSession
295
295
``` javascript
296
296
// Since 5.8.0, the driver has offered a way to run a single query transaction with minimal boilerplate.
297
297
// The driver.executeQuery() function features the same automatic retries as transaction functions.
298
- //
299
298
var executeQueryResultPromise = driver
300
299
.executeQuery (
301
- " MATCH (alice:Person {name: $nameParam}) RETURN alice.DOB AS DateOfBirth" ,
300
+ " MATCH (alice:Person {name: $nameParam}) RETURN alice.DOB AS DateOfBirth" ,
302
301
{
303
302
nameParam: ' Alice'
304
- },
303
+ },
305
304
{
306
- routing: ' READ' ,
305
+ routing: ' READ' ,
307
306
database: ' neo4j'
308
307
}
309
308
)
@@ -321,17 +320,17 @@ executeQueryResultPromise
321
320
### Auto-Commit/Implicit Transaction
322
321
323
322
``` javascript
324
- // This is the most basic and limited form with which to run a Cypher query.
323
+ // This is the most basic and limited form with which to run a Cypher query.
325
324
// The driver will not automatically retry implicit transactions.
326
325
// This function should only be used when the other driver query interfaces do not fit the purpose.
327
- // Implicit transactions are the only ones that can be used for CALL { … } IN TRANSACTIONS queries.
326
+ // Implicit transactions are the only ones that can be used for CALL { … } IN TRANSACTIONS queries.
328
327
329
328
var implicitTxResultPromise = session
330
329
.run (
331
- " CALL { … } IN TRANSACTIONS" ,
330
+ " CALL { … } IN TRANSACTIONS" ,
332
331
{
333
332
param1: ' param'
334
- },
333
+ },
335
334
{
336
335
database: ' neo4j'
337
336
}
0 commit comments