diff options
Diffstat (limited to 'lib/sqlalchemy/engine')
| -rw-r--r-- | lib/sqlalchemy/engine/__init__.py | 6 | ||||
| -rw-r--r-- | lib/sqlalchemy/engine/strategies.py | 3 |
2 files changed, 8 insertions, 1 deletions
diff --git a/lib/sqlalchemy/engine/__init__.py b/lib/sqlalchemy/engine/__init__.py index 4fac3e532..23b4b0b3b 100644 --- a/lib/sqlalchemy/engine/__init__.py +++ b/lib/sqlalchemy/engine/__init__.py @@ -306,6 +306,12 @@ def create_engine(*args, **kwargs): this is configurable with the MySQLDB connection itself and the server configuration as well). + :param pool_reset_on_return='rollback': set the "reset on return" + behavior of the pool, which is whether ``rollback()``, + ``commit()``, or nothing is called upon connections + being returned to the pool. See the docstring for + ``reset_on_return`` at :class:`.Pool`. (new as of 0.7.6) + :param pool_timeout=30: number of seconds to wait before giving up on getting a connection from the pool. This is only used with :class:`~sqlalchemy.pool.QueuePool`. diff --git a/lib/sqlalchemy/engine/strategies.py b/lib/sqlalchemy/engine/strategies.py index 7b2da68c4..e3a6c5026 100644 --- a/lib/sqlalchemy/engine/strategies.py +++ b/lib/sqlalchemy/engine/strategies.py @@ -108,7 +108,8 @@ class DefaultEngineStrategy(EngineStrategy): 'timeout': 'pool_timeout', 'recycle': 'pool_recycle', 'events':'pool_events', - 'use_threadlocal':'pool_threadlocal'} + 'use_threadlocal':'pool_threadlocal', + 'reset_on_return':'pool_reset_on_return'} for k in util.get_cls_kwargs(poolclass): tk = translate.get(k, k) if tk in kwargs: |
