Driver.execute_query now accepts a Query object to specify transaction config like metadata and transaction timeout. Example:
from neo4j import (
GraphDatabase,
Query,
)
with GraphDatabase.driver(...) as driver:
driver.execute_query(
Query(
"MATCH (n) RETURN n",
# metadata to be logged with the transaction
metadata={"foo": "bar"},
# give the transaction 5 seconds to complete on the DBMS
timeout=5,
),
# all the other configuration options as before
database_="neo4j",
# ...
)
Driver.execute_query
now accepts aQuery
object to specify transaction config like metadata and transaction timeout. Example:Related: