]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
document mock strategy, [ticket:2439]
authorMike Bayer <mike_mp@zzzcomputing.com>
Fri, 4 May 2012 21:45:57 +0000 (17:45 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Fri, 4 May 2012 21:45:57 +0000 (17:45 -0400)
lib/sqlalchemy/engine/__init__.py

index 23b4b0b3b85d922d06bbbf39e3f5185038012930..9e48f64593ff91cdb41c097929bf5798d031d8e6 100644 (file)
@@ -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 <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'``.
 
     """