@@ -46,6 +46,38 @@ Connection Methods
4646
4747 .. dbapimethodextension ::
4848
49+ .. method :: Connection.begin_sessionless_transaction(transaction_id=None, \
50+ timeout=60, defer_round_trip=False)
51+
52+ Begins a new sessionless transaction using the specified transaction
53+ identifier. This method returns the transaction identifier specified by the
54+ user or generated by python-oracledb.
55+
56+ The ``transaction_id `` parameter should be of type string or bytes. If
57+ specified, it represents a unique identifier for the transaction. If a
58+ string is passed, then it will be UTF-8 encoded to bytes. If this value is
59+ not specified, then python-oracledb generates a a random
60+ `universally-unique identifier (UUID) <https://www.rfc-editor.org/rfc/
61+ rfc4122.txt> `__ value when
62+ ``Connection.begin_sessionless_transaction() `` is called. An example is
63+ "36b8f84d-df4e-4d49-b662-bcde71a8764f". The user-chosen value cannot exceed
64+ 64 bytes in length.
65+
66+ The ``timeout `` parameter is the number of seconds that this transaction
67+ can be resumed by a connection the next time that it is suspended. The
68+ default value is *60 * seconds. If a transaction is not resumed within this
69+ specified duration, the transaction will be rolled back.
70+
71+ The ``defer_round_trip `` parameter is a boolean that determines whether
72+ the request to start a transaction is to be sent immediately or with the
73+ next database operation. If set to *False *, the request is sent
74+ immediately. If set to *True *, the request is included with the next
75+ database operation on the connection. The default value is *False *.
76+
77+ See :ref: `sessionlesstxns `.
78+
79+ .. versionadded :: 3.3.0
80+
4981.. method :: Connection.cancel()
5082
5183 Breaks a long-running statement.
@@ -277,6 +309,48 @@ Connection Methods
277309
278310 .. dbapimethodextension ::
279311
312+ .. method :: Connection.resume_sessionless_transaction(transaction_id, \
313+ timeout=60, defer_round_trip=False)
314+
315+ Resumes an existing sessionless transaction using the specified
316+ transaction identifier. This method returns the transaction identifier
317+ used to resume the sessionless transaction.
318+
319+ The ``transaction_id `` parameter should be a string or bytes value that
320+ uniquely identifies an existing sessionless transaction that is to be
321+ resumed.
322+
323+ The ``timeout `` parameter is the number of seconds that the current
324+ connection waits to resume a transaction if another connection is using it.
325+ This timeout is only effective when the transaction is in use by another
326+ connection. In this case, the current connection waits for the transaction
327+ to be suspended within this timeout period. When ``defer_round_trip `` is
328+ set to *False *, the wait happens in the
329+ ``resume_sessionless_transaction() `` call itself, and the function blocks
330+ until the transaction becomes available or the timeout expires.
331+ When ``defer_round_trip `` is set to *True *, the resume is deferred and the
332+ wait occurs at the time of the next database operation instead. At the
333+ start of the wait period, if the transaction is not in use by any other
334+ connection, the resume happens immediately. If the transaction remains in
335+ use by the other connection after the timeout period, the error `ORA-25351
336+ <https://docs.oracle.com/en/error-help/db/ora-25351> `__ is raised. If
337+ another connection completes the transaction, the error `ORA-24756
338+ <https://docs.oracle.com/en/error-help/db/ora-24756> `__ is raised. These
339+ error messages are only thrown for non-RAC instances. For information on
340+ using Oracle RAC, see
341+ :ref: `Sessionless Transactions with Oracle RAC <sessionlesstxnswithrac >`.
342+ The default value is *60 * seconds.
343+
344+ The ``defer_round_trip `` parameter is a boolean that determines whether
345+ the request to resume a transaction is to be sent immediately or with the
346+ next database operation. If set to *False *, the request is sent
347+ immediately. If set to *True *, the request is included with the next
348+ database operation on the connection. The default value is *False *.
349+
350+ See :ref: `sessionlesstxns `.
351+
352+ .. versionadded :: 3.3.0
353+
280354.. method :: Connection.rollback()
281355
282356 Rolls back any pending transactions.
@@ -419,6 +493,20 @@ Connection Methods
419493 explicitly closed using the function :meth: `~Connection.close() `, the
420494 subscription will not be deregistered in the database.
421495
496+ .. method :: Connection.suspend_sessionless_transaction()
497+
498+ Suspends the currently active sessionless transaction immediately.
499+
500+ This detaches the transaction from the connection, allowing it to be
501+ resumed later with the transaction identifier that was specified during
502+ creation of the sessionless transaction. Also, the timeout value defined in
503+ :meth: `Connection.begin_sessionless_transaction() ` comes into effect and
504+ determines how long the transaction can stay suspended.
505+
506+ See :ref: `sessionlesstxns `.
507+
508+ .. versionadded :: 3.3.0
509+
422510.. method :: Connection.tpc_begin(xid, flags, timeout)
423511
424512 Begins a Two-Phase Commit (TPC) on a global transaction using the specified
0 commit comments