From: Mike Bayer Date: Fri, 4 May 2012 21:45:57 +0000 (-0400) Subject: document mock strategy, [ticket:2439] X-Git-Tag: rel_0_7_7~7 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ea1d6e7b59aac03678c57938022b8d01aa699616;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git document mock strategy, [ticket:2439] --- 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'``. """