@@ -36,9 +36,31 @@ class Query:
3636
3737 :param text: The query text.
3838 :type text: typing.LiteralString
39- :param metadata: metadata attached to the query.
39+ :param metadata:
40+ a dictionary with metadata.
41+ Specified metadata will be attached to the executing transaction
42+ and visible in the output of ``SHOW TRANSACTIONS YIELD *``
43+ It will also get logged to the ``query.log``.
44+ This functionality makes it easier to tag transactions and is
45+ equivalent to the ``dbms.setTXMetaData`` procedure, see
46+ https://neo4j.com/docs/cypher-manual/current/clauses/transaction-clauses/#query-listing-transactions
47+ and https://neo4j.com/docs/operations-manual/current/reference/procedures/
48+ for reference.
4049 :type metadata: typing.Dict[str, typing.Any] | None
41- :param timeout: seconds.
50+ :param timeout:
51+ the transaction timeout in seconds.
52+ Transactions that execute longer than the configured timeout will
53+ be terminated by the database.
54+ This functionality allows to limit query/transaction execution
55+ time.
56+ The Specified timeout overrides the default timeout configured in
57+ the database using the ``db.transaction.timeout`` setting
58+ (``dbms.transaction.timeout`` before Neo4j 5.0).
59+ Values higher than ``db.transaction.timeout`` will be ignored and
60+ will fall back to the default for server versions 4.2 to including
61+ 5.2. The value should not represent a negative duration.
62+ A ``0`` duration will make the transaction execute indefinitely.
63+ :data:`None` will use the default timeout configured on the server.
4264 :type timeout: float | None
4365 """
4466 def __init__ (
@@ -90,16 +112,18 @@ def count_people_tx(tx):
90112
91113 :param timeout:
92114 the transaction timeout in seconds.
93- Transactions that execute longer than the configured timeout will be
94- terminated by the database.
95- This functionality allows to limit query/transaction execution time.
96- Specified timeout overrides the default timeout configured in the
97- database using ``dbms.transaction.timeout`` setting.
98- Values higher than ``dbms.transaction.timeout`` will be ignored and
99- will fall back to default (unless using Neo4j < 4.2).
100- Value should not represent a negative duration.
101- A zero duration will make the transaction execute indefinitely.
102- None will use the default timeout configured in the database.
115+ Transactions that execute longer than the configured timeout will
116+ be terminated by the database.
117+ This functionality allows to limit query/transaction execution
118+ time.
119+ The Specified timeout overrides the default timeout configured in
120+ the database using the ``db.transaction.timeout`` setting
121+ (``dbms.transaction.timeout`` before Neo4j 5.0).
122+ Values higher than ``db.transaction.timeout`` will be ignored and
123+ will fall back to the default for server versions 4.2 to including
124+ 5.2. The value should not represent a negative duration.
125+ A ``0`` duration will make the transaction execute indefinitely.
126+ :data:`None` will use the default timeout configured on the server.
103127 :type timeout: float | None
104128
105129 :rtype: typing.Callable[[T], T]
0 commit comments