Warn that execute_write_fn(fn) should be a non-async function

pull/1474/head
Simon Willison 2021-09-12 13:13:52 -07:00 zatwierdzone przez GitHub
rodzic d57ab156b3
commit b28b6cd2fe
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
1 zmienionych plików z 4 dodań i 0 usunięć

Wyświetl plik

@ -664,6 +664,10 @@ This method works like ``.execute_write()``, but instead of a SQL statement you
The function can then perform multiple actions, safe in the knowledge that it has exclusive access to the single writable connection as long as it is executing.
.. warning::
``fn`` needs to be a regular function, not an ``async def`` function.
For example:
.. code-block:: python