From ea1d6e7b59aac03678c57938022b8d01aa699616 Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Fri, 4 May 2012 17:45:57 -0400 Subject: [PATCH] document mock strategy, [ticket:2439] --- lib/sqlalchemy/engine/__init__.py | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/lib/sqlalchemy/engine/__init__.py b/lib/sqlalchemy/engine/__init__.py index 23b4b0b3b8..9e48f64593 100644 --- a/lib/sqlalchemy/engine/__init__.py +++ b/lib/sqlalchemy/engine/__init__.py @@ -317,8 +317,17 @@ def create_engine(*args, **kwargs): with :class:`~sqlalchemy.pool.QueuePool`. :param strategy='plain': selects alternate engine implementations. - Currently available is the ``threadlocal`` - strategy, which is described in :ref:`threadlocal_strategy`. + Currently available are: + + * the ``threadlocal`` strategy, which is described in + :ref:`threadlocal_strategy`; + * the ``mock`` strategy, which dispatches all statement + execution to a function passed as the argument ``executor``. + See `example in the FAQ `_. + + :param executor=None: a function taking arguments + ``(sql, *multiparams, **params)``, to which the ``mock`` strategy will + dispatch all statement execution. Used only by ``strategy='mock'``. """ -- 2.47.2