From 07ea5a7a1a92197a95f6ac5cfd03f73022ecf25b Mon Sep 17 00:00:00 2001 From: timofey Date: Tue, 22 Nov 2022 13:54:20 +0000 Subject: [PATCH] one more usecase --- docs/source/usage.rst | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/docs/source/usage.rst b/docs/source/usage.rst index f2b89bd..7be9685 100644 --- a/docs/source/usage.rst +++ b/docs/source/usage.rst @@ -57,6 +57,11 @@ Different ways to get/set a value: transaction.set_nowait('increment-4', value4 + 1) await transaction.commit() + with connection.transaction() as transaction: + value5 = transaction.get('increment-5', 0) + transaction.set_nowait('increment-5', value5 + 1) + await connection.commit() + .. autoclass:: ptvp35.DbConnection .. automethod:: get