@@ -103,7 +103,7 @@ import neo4j from 'https://cdn.jsdelivr.net/npm/neo4j-driver@X.Y.Z/lib/browser/n
103103```
104104
105105It 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
107107is not the same as the lifetime of the web page:
108108
109109``` javascript
@@ -116,13 +116,13 @@ driver.close() // returns a Promise
116116
117117``` javascript
118118// 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.
120120var driver = neo4j .driver (
121121 ' neo4j://localhost' ,
122122 neo4j .auth .basic (' neo4j' , ' password' )
123123)
124124
125- // Close the driver when application exits.
125+ // Close the driver when the application exits.
126126// This closes all used network connections.
127127await driver .close ()
128128```
@@ -295,15 +295,14 @@ rxSession
295295``` javascript
296296// Since 5.8.0, the driver has offered a way to run a single query transaction with minimal boilerplate.
297297// The driver.executeQuery() function features the same automatic retries as transaction functions.
298- //
299298var executeQueryResultPromise = driver
300299 .executeQuery (
301- " MATCH (alice:Person {name: $nameParam}) RETURN alice.DOB AS DateOfBirth" ,
300+ " MATCH (alice:Person {name: $nameParam}) RETURN alice.DOB AS DateOfBirth" ,
302301 {
303302 nameParam: ' Alice'
304- },
303+ },
305304 {
306- routing: ' READ' ,
305+ routing: ' READ' ,
307306 database: ' neo4j'
308307 }
309308 )
@@ -321,17 +320,17 @@ executeQueryResultPromise
321320### Auto-Commit/Implicit Transaction
322321
323322``` 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.
325324// The driver will not automatically retry implicit transactions.
326325// 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.
328327
329328var implicitTxResultPromise = session
330329 .run (
331- " CALL { … } IN TRANSACTIONS" ,
330+ " CALL { … } IN TRANSACTIONS" ,
332331 {
333332 param1: ' param'
334- },
333+ },
335334 {
336335 database: ' neo4j'
337336 }
0 commit comments