James Henstridge wrote:

> Here is an updated version of the proposal.  It removes the analysis
> of the different databases, and updates the proposed API to match what
> we've been discussing here.

I'm happy with the design.

I personally don't think we should use the xa prefix, as this will make
people think that this is an XA interface when it isn't - an XA like API
would be something built on top of this.

I would think the following would be better names:
    con.begin_prepared(xid=None)
    con.prepare_transaction()
    con.rollback_prepared(xid=None)
    con.commit_prepared(xid=None)
    con.list_prepared()

> I've added a section about what the "xid" arguments to the various
> methods should look like.  That could probably do with some more
> discussion as I am not too sure about it.
> 
> I've also included support for transaction recovery in the form of an
> xa_recover() method and calling the xa_commit()/xa_rollback() methods
> with a transaction ID as an argument.

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).


-- 
Stuart Bishop <[EMAIL PROTECTED]>
http://www.stuartbishop.net/

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
DB-SIG maillist  -  DB-SIG@python.org
http://mail.python.org/mailman/listinfo/db-sig

Reply via email to