summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/engine.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2006-04-07 00:22:55 +0000
committerMike Bayer <mike_mp@zzzcomputing.com>2006-04-07 00:22:55 +0000
commitedfb66680d08a61869c63cf234baf23d657a0691 (patch)
tree09329940d07c058290e1fa000aeae6efd732bda3 /lib/sqlalchemy/engine.py
parent91df1bc17be81bb8b2122ee2f19b77a137b7b839 (diff)
downloadsqlalchemy-edfb66680d08a61869c63cf234baf23d657a0691.tar.gz
pool argument adjusts for DBProxy/Pool
Diffstat (limited to 'lib/sqlalchemy/engine.py')
-rw-r--r--lib/sqlalchemy/engine.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/sqlalchemy/engine.py b/lib/sqlalchemy/engine.py
index 9572a4310..8fe6c047a 100644
--- a/lib/sqlalchemy/engine.py
+++ b/lib/sqlalchemy/engine.py
@@ -47,9 +47,10 @@ def create_engine(name, opts=None,**kwargs):
In both cases, **kwargs represents options to be sent to the SQLEngine itself. A possibly
partial listing of those options is as follows:
- pool=None : an instance of sqlalchemy.pool.DBProxy to be used as the underlying source
- for connections (DBProxy is described in the previous section). If None, a default DBProxy
- will be created using the engine's own database module with the given arguments.
+ pool=None : an instance of sqlalchemy.pool.DBProxy or sqlalchemy.pool.Pool to be used as the
+ underlying source for connections (DBProxy/Pool is described in the previous section). If None,
+ a default DBProxy will be created using the engine's own database module with the given
+ arguments.
echo=False : if True, the SQLEngine will log all statements as well as a repr() of their
parameter lists to the engines logger, which defaults to sys.stdout. A SQLEngine instances'
@@ -240,6 +241,8 @@ class SQLEngine(schema.SchemaEngine):
params['echo'] = echo_pool
params['use_threadlocal'] = True
self._pool = sqlalchemy.pool.manage(self.dbapi(), **params).get_pool(*cargs, **cparams)
+ elif isinstance(pool, sqlalchemy.pool.DBProxy):
+ self._pool = pool.get_pool(*cargs, **cparams)
else:
self._pool = pool
self.default_ordering=default_ordering