summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/engine
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2012-05-04 17:46:06 -0400
committerMike Bayer <mike_mp@zzzcomputing.com>2012-05-04 17:46:06 -0400
commitddcfd132ae75e1069e3b383af72936fb3be91ad9 (patch)
treed64afe819ebf7e2252979cb35fa918b26571c72c /lib/sqlalchemy/engine
parentc6d4471af3949e339912edc4fa404d77eb31e5fb (diff)
downloadsqlalchemy-ddcfd132ae75e1069e3b383af72936fb3be91ad9.tar.gz
docuemnt mock strategy, [ticket:2439]
Diffstat (limited to 'lib/sqlalchemy/engine')
-rw-r--r--lib/sqlalchemy/engine/__init__.py13
1 files changed, 11 insertions, 2 deletions
diff --git a/lib/sqlalchemy/engine/__init__.py b/lib/sqlalchemy/engine/__init__.py
index c3667dd33..3fa594216 100644
--- a/lib/sqlalchemy/engine/__init__.py
+++ b/lib/sqlalchemy/engine/__init__.py
@@ -323,8 +323,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 <http://www.sqlalchemy.org/trac/wiki/FAQ#HowcanIgettheCREATETABLEDROPTABLEoutputasastring>`_.
+
+ :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'``.
"""