summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/engine.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2006-03-14 19:51:03 +0000
committerMike Bayer <mike_mp@zzzcomputing.com>2006-03-14 19:51:03 +0000
commit7f98b58c871c690e861c16091b3c507f90b1ddda (patch)
tree1f26ba358371b94acb9d7f3f030076457bfc01d1 /lib/sqlalchemy/engine.py
parentbbf9f191ec10067d282df63f4c684af2c00d8110 (diff)
downloadsqlalchemy-7f98b58c871c690e861c16091b3c507f90b1ddda.tar.gz
added unique_connection() method to engine, connection pool to return a connection
that is not part of the thread-local context or any current transaction
Diffstat (limited to 'lib/sqlalchemy/engine.py')
-rw-r--r--lib/sqlalchemy/engine.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/sqlalchemy/engine.py b/lib/sqlalchemy/engine.py
index 8a29b847f..44ffadfeb 100644
--- a/lib/sqlalchemy/engine.py
+++ b/lib/sqlalchemy/engine.py
@@ -395,6 +395,10 @@ class SQLEngine(schema.SchemaEngine):
"""returns a managed DBAPI connection from this SQLEngine's connection pool."""
return self._pool.connect()
+ def unique_connection(self):
+ """returns a DBAPI connection from this SQLEngine's connection pool that is distinct from the current thread's connection."""
+ return self._pool.unique_connection()
+
def multi_transaction(self, tables, func):
"""provides a transaction boundary across tables which may be in multiple databases.
If you have three tables, and a function that operates upon them, providing the tables as a