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

index c3667dd3359afdee20e97babffa323212cb52624..3fa5942166715007e851a51a011f75ab1f315f67 100644 (file)
@@ -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'``.
 
     """