We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent aa66dca commit 12608beCopy full SHA for 12608be
code/python/example.py
@@ -4,16 +4,19 @@
4
from neo4j import GraphDatabase, basic_auth
5
6
driver = GraphDatabase.driver(
7
- "bolt://<HOST>:<BOLTPORT>",
8
- auth=basic_auth("<USERNAME>", "<PASSWORD>"))
9
-session = driver.session()
+ "bolt://<HOST>:<BOLTPORT>",
+ auth=basic_auth("<USERNAME>", "<PASSWORD>"))
10
11
cypher_query = '''
12
<QUERY>
13
'''
14
15
-results = session.run(cypher_query,
16
- parameters={"<PARAM-NAME>":["<PARAM-VALUE>"]})
+with driver.session() as session:
+ results = session.read_transaction(
+ lambda tx: tx.run(cypher_query,
17
+ <PARAM-NAME>=["<PARAM-VALUE>"]))
18
-for record in results:
19
- print(record['<RESULT-COLUMN>'])
+ for record in results:
20
+ print(record['<RESULT-COLUMN>'])
21
+
22
+driver.close()
0 commit comments