File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed
Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -410,8 +410,9 @@ The `populate()` function handles session and transaction management automatical
410410``` kotlin
411411// ✅ Recommended for simple single-transaction operations
412412val count = neo4j.read { tx ->
413- tx.run (" MATCH (p:Person) RETURN count(p) as count" )
414- .single()[" count" ].asInt()
413+ tx.run (
414+ " MATCH (p:Person) RETURN count(p) as count"
415+ ).single()[" count" ].asInt()
415416}
416417```
417418
@@ -424,8 +425,9 @@ neo4j.withSession { session ->
424425 tx.run (" CREATE (p:Person {name: 'Alice'})" )
425426 }
426427 val count = session.executeRead { tx ->
427- tx.run (" MATCH (p:Person) RETURN count(p) as count" )
428- .single()[" count" ].asInt()
428+ tx.run (
429+ " MATCH (p:Person) RETURN count(p) as count"
430+ ).single()[" count" ].asInt()
429431 }
430432 println (" Created and counted: $count " )
431433}
You can’t perform that action at this time.
0 commit comments