[DB-SIG] Two-phase commit API proposal (was Re: Any standard for two phase commit APIs?)
James Henstridge
james at jamesh.id.au
Tue Jan 22 12:36:17 CET 2008
On 22/01/2008, Stuart Bishop <stuart at stuartbishop.net> wrote:
> It seems that the formatID is unnecessary and just a requirement of the XA C
> interface. Also, the xid() method you propose should be camelcase to match
> the other type constructors, so Xid(gtrid, bqual=None) or
> TransactionId(gtrid, bqual=None). If the xa_recover/list_prepared method
> returns TransactionId objects they can contain platform specific information
> too which is great (username, prepared timestamp & database for PostgreSQL
> for instance).
Well, the DB-API does not actually expose any classes other than the
exceptions. The primary objects you work with are all created by
factory functions/methods:
* Connections from module.connect()
* Cursors from connection.cursor()
I was suggesting that transaction ID objects be created by either a
module.xid() or connection.xid() factory function and not make the
class object part of the API.
James.
More information about the DB-SIG
mailing list