On 23/03/2007, at 3:40 AM, Michael Bayer wrote:

>
> OK, I like a lot of this patch.  I know im being a pain in the ass
> about these patches, and for that I apologize; they are of high
> quality and theyre clear in their operation/intention etc.

That's cool.  I'm fairly new to the SQLAlchemy codebase so I don't  
expect to meet your requirements straight off the bat. =)

[snip well argued points]

> so to summarize: I would like to see just the prepare() and do_prepare
> () methods in base.py, do_prepare() being a no-op, and thats it.
> postgres dialect can then create and bookkeep "txn_ids".  support for
> multiple trans per connection and such would have to wait for an
> opened up engine api which includes a TransactionContext, which in
> itself would probably want to wait for a DBAPI 3.0 that has more to
> say on this subject.

Alrighty.  Here's version 2 of the patch.  The txn_ids now live  
within PGDialect.  I've kept Transaction.prepare and the various  
do_prepare as well as _prepare_impl on Connection.  If unimplemented,  
prepare is a no-op.

My only point would be that if we have several database backends that  
support two-phase with a transaction ID concept, we may want to have  
a general function for generating transaction IDs just so people  
don't have to go re-implementing it all over the place.  I'm happy to  
use a different scheme instead of the current md5-of-object-id-and- 
time think I'm using, I just think it makes more sense to have a  
general one than several implementation-specific ones.

Let me know what you think.


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en
-~----------~----~----~----~------~----~------~--~---

Attachment: sqlalchemy-two-phase-2.patch
Description: Binary data

-- 
Benno Rice
[EMAIL PROTECTED]
http://jeamland.net/


Reply via email to