summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/interfaces.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2007-08-17 17:59:08 +0000
committerMike Bayer <mike_mp@zzzcomputing.com>2007-08-17 17:59:08 +0000
commit95748cfc024a9fa875c0ec9323ec5266bb4725c5 (patch)
tree6473ca891975813e5abea96912a2fdc20a6dce48 /lib/sqlalchemy/interfaces.py
parent3469724a42acff29c8e064b3cfaf8d073790624b (diff)
downloadsqlalchemy-95748cfc024a9fa875c0ec9323ec5266bb4725c5.tar.gz
- added extra argument con_proxy to ConnectionListener interface checkout/checkin methods
- changed testing connection closer to work on _ConnectionFairy instances, resulting in pool checkins, not actual closes - disabled session two phase test for now, needs work - added some two-phase support to TLEngine, not tested - TLTransaction is now a wrapper
Diffstat (limited to 'lib/sqlalchemy/interfaces.py')
-rw-r--r--lib/sqlalchemy/interfaces.py20
1 files changed, 15 insertions, 5 deletions
diff --git a/lib/sqlalchemy/interfaces.py b/lib/sqlalchemy/interfaces.py
index 227e1b01a..05a8a4a34 100644
--- a/lib/sqlalchemy/interfaces.py
+++ b/lib/sqlalchemy/interfaces.py
@@ -50,17 +50,22 @@ class PoolListener(object):
``Connection`` wrapper).
con_record
- The ``_ConnectionRecord`` that currently owns the connection
+ The ``_ConnectionRecord`` that persistently manages the connection
+
"""
- def checkout(dbapi_con, con_record):
+ def checkout(dbapi_con, con_record, con_proxy):
"""Called when a connection is retrieved from the Pool.
dbapi_con
A raw DB-API connection
con_record
- The ``_ConnectionRecord`` that currently owns the connection
+ The ``_ConnectionRecord`` that persistently manages the connection
+
+ con_proxy
+ The ``_ConnectionFairy`` which manages the connection for the span of
+ the current checkout.
If you raise an ``exceptions.DisconnectionError``, the current
connection will be disposed and a fresh connection retrieved.
@@ -68,7 +73,7 @@ class PoolListener(object):
using the new connection.
"""
- def checkin(dbapi_con, con_record):
+ def checkin(dbapi_con, con_record, con_proxy):
"""Called when a connection returns to the pool.
Note that the connection may be closed, and may be None if the
@@ -79,5 +84,10 @@ class PoolListener(object):
A raw DB-API connection
con_record
- The _ConnectionRecord that currently owns the connection
+ The ``_ConnectionRecord`` that persistently manages the connection
+
+ con_proxy
+ The ``_ConnectionFairy`` which manages the connection for the span of
+ the current checkout.
+
"""