>
> I hadn't heard of DejaVu until now. One issue with SQLAlchemy is
> connect/rollback are buried in the SQL and ORM APIs, so I'm not sure
> how useful it would be to shoehorn them into this API which is "out of
> band" from the controller code.
just to clarify, not really. the entire point of the "explicit
connection" API, which 99% of the time people either arent aware of,
or find it to be "too verbose" when they see it, is that the
"transaction" going on can be completely extracted to be external to
everything SQLAlchemy. if we are looking for an ORM-agnostic API that
just wraps all internal operations in a transaction, the SAContext
need not even be involved, youd use SessionTransaction against its
current session.
Also SAContext has no dependence on "bound" metadata as it supports
alternative strategies which define the usage of engines, and that it
takes the database URI in its constructor is just a small
implementation detail thats easily changed. "Bound" metadata in its
old sense no longer exists in SQLAlchemy, as all "metadata" objects
can have a new Engine assigned to them at any time (or not at all).
Is this a full-request transaction
> the controller is expected to use? Can we assume that every
> controller has no more than one transaction, and that rollback always
> corresponds to certain HTTP status codes?
it seems we are talking about just the case where, "the entire request
is inside of a transaction", and it seems like this is mainly for the
purposes of WSGI middleware...having any fine-grained access to the
ORM in an agnostic way (i.e. anything beyond "define connection
parameters" and "transaction boundaries") would be unworkable.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"pylons-discuss" 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/pylons-discuss?hl=en
-~----------~----~----~----~------~----~------~--~---