From 2e0917494d91f471eaed9a79e5ae912219fde07d Mon Sep 17 00:00:00 2001 From: Robsdedude Date: Fri, 4 Nov 2022 09:46:01 +0100 Subject: [PATCH] API docs: replace deprecated Cypher procedures (#850) `dbms.listQueries` and `dbms.listTransactions` have been deprecated in favor of `SHOW TRANSACTIONS YIELD *` --- neo4j/_async/work/session.py | 9 +++++++-- neo4j/_sync/work/session.py | 9 +++++++-- neo4j/work/query.py | 12 ++++++------ 3 files changed, 20 insertions(+), 10 deletions(-) diff --git a/neo4j/_async/work/session.py b/neo4j/_async/work/session.py index 6d5d40ef6..4cb609b33 100644 --- a/neo4j/_async/work/session.py +++ b/neo4j/_async/work/session.py @@ -416,9 +416,14 @@ async def begin_transaction( :param metadata: a dictionary with metadata. - Specified metadata will be attached to the executing transaction and visible in the output of ``dbms.listQueries`` and ``dbms.listTransactions`` procedures. + Specified metadata will be attached to the executing transaction + and visible in the output of ``SHOW TRANSACTIONS YIELD *`` It will also get logged to the ``query.log``. - This functionality makes it easier to tag transactions and is equivalent to ``dbms.setTXMetaData`` procedure, see https://neo4j.com/docs/operations-manual/current/reference/procedures/ for procedure reference. + This functionality makes it easier to tag transactions and is + equivalent to the ``dbms.setTXMetaData`` procedure, see + https://neo4j.com/docs/cypher-manual/current/clauses/transaction-clauses/#query-listing-transactions + and https://neo4j.com/docs/operations-manual/current/reference/procedures/ + for reference. :param timeout: the transaction timeout in seconds. diff --git a/neo4j/_sync/work/session.py b/neo4j/_sync/work/session.py index 05f34d302..c42783b85 100644 --- a/neo4j/_sync/work/session.py +++ b/neo4j/_sync/work/session.py @@ -416,9 +416,14 @@ def begin_transaction( :param metadata: a dictionary with metadata. - Specified metadata will be attached to the executing transaction and visible in the output of ``dbms.listQueries`` and ``dbms.listTransactions`` procedures. + Specified metadata will be attached to the executing transaction + and visible in the output of ``SHOW TRANSACTIONS YIELD *`` It will also get logged to the ``query.log``. - This functionality makes it easier to tag transactions and is equivalent to ``dbms.setTXMetaData`` procedure, see https://neo4j.com/docs/operations-manual/current/reference/procedures/ for procedure reference. + This functionality makes it easier to tag transactions and is + equivalent to the ``dbms.setTXMetaData`` procedure, see + https://neo4j.com/docs/cypher-manual/current/clauses/transaction-clauses/#query-listing-transactions + and https://neo4j.com/docs/operations-manual/current/reference/procedures/ + for reference. :param timeout: the transaction timeout in seconds. diff --git a/neo4j/work/query.py b/neo4j/work/query.py index a69ca2a68..8065ba2b8 100644 --- a/neo4j/work/query.py +++ b/neo4j/work/query.py @@ -67,14 +67,14 @@ def count_people_tx(tx): :param metadata: a dictionary with metadata. - Specified metadata will be attached to the executing transaction and - visible in the output of ``dbms.listQueries`` and - ``dbms.listTransactions`` procedures. + Specified metadata will be attached to the executing transaction + and visible in the output of ``SHOW TRANSACTIONS YIELD *`` It will also get logged to the ``query.log``. This functionality makes it easier to tag transactions and is - equivalent to ``dbms.setTXMetaData`` procedure, see - https://neo4j.com/docs/operations-manual/current/reference/procedures/ - for procedure reference. + equivalent to the ``dbms.setTXMetaData`` procedure, see + https://neo4j.com/docs/cypher-manual/current/clauses/transaction-clauses/#query-listing-transactions + and https://neo4j.com/docs/operations-manual/current/reference/procedures/ + for reference. :param timeout: the transaction timeout in seconds.