MCPcopy
hub / github.com/psycopg/psycopg / tpc_begin

Method tpc_begin

psycopg/psycopg/connection.py:528–533  ·  view source on GitHub ↗

Begin a TPC transaction with the given transaction ID `!xid`.

(self, xid: Xid | str)

Source from the content-addressed store, hash-verified

526 self.wait(self._set_deferrable_gen(value))
527
528 def tpc_begin(self, xid: Xid | str) -> None:
529 """
530 Begin a TPC transaction with the given transaction ID `!xid`.
531 """
532 with self.lock:
533 self.wait(self._tpc_begin_gen(xid))
534
535 def tpc_prepare(self) -> None:
536 """

Callers 15

test_tpc_disabledFunction · 0.45
test_tpc_commitMethod · 0.45
test_tpc_rollbackMethod · 0.45
test_xid_encodingMethod · 0.45
test_xid_roundtripMethod · 0.45
test_xid_unicodeMethod · 0.45

Calls 2

waitMethod · 0.95
_tpc_begin_genMethod · 0.80

Tested by 15

test_tpc_disabledFunction · 0.36
test_tpc_commitMethod · 0.36
test_tpc_rollbackMethod · 0.36
test_xid_encodingMethod · 0.36
test_xid_roundtripMethod · 0.36
test_xid_unicodeMethod · 0.36