From 1dc6b5aa644a92d3654f7068110ed7930989ce71 Mon Sep 17 00:00:00 2001 From: Simon Willison Date: Mon, 7 Aug 2023 11:47:34 -0700 Subject: [PATCH] Note about execute_plugins=False, refs #575 --- docs/python-api.rst | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/docs/python-api.rst b/docs/python-api.rst index 21fad3d..e63c27d 100644 --- a/docs/python-api.rst +++ b/docs/python-api.rst @@ -111,6 +111,12 @@ Connections use ``PRAGMA recursive_triggers=on`` by default. If you don't want t db = Database(memory=True, recursive_triggers=False) +By default, any :ref:`sqlite-utils plugins ` that implement the :ref:`plugins_hooks_prepare_connection` hook will be executed against the connection when you create the ``Database`` object. You can opt out of executing plugins using ``execute_plugins=False`` like this: + +.. code-block:: python + + db = Database(memory=True, execute_plugins=False) + .. _python_api_attach: Attaching additional databases