def tpc_begin(self, xid): if not isinstance(xid, Xid): xid = Xid.from_string(xid) if self.status != consts.STATUS_READY: raise exceptions.ProgrammingError( 'tpc_begin must be called outside a transaction') if self._autocommit: raise exceptions.ProgrammingError( "tpc_begin can't be called in autocommit mode") self._begin_transaction() self._tpc_xid = xid
def tpc_recover(self): return Xid.tpc_recover(self)
def xid(self, format_id, gtrid, bqual): return Xid(format_id, gtrid, bqual)