home / docs / sections

sections

1 row where breadcrumbs = "["Internals for plugins", "Database class"]", page = "internals" and title = "await db.execute_isolated_fn(fn)"

✎ View and edit SQL

This data as json, CSV (advanced)

Suggested facets: breadcrumbs (array)

id ▼ page ref title content breadcrumbs references
internals:database-execute-isolated-fn internals database-execute-isolated-fn await db.execute_isolated_fn(fn) This method works is similar to execute_write_fn() but executes the provided function in an entirely isolated SQLite connection, which is opened, used and then closed again in a single call to this method. The prepare_connection() plugin hook is not executed against this connection. This allows plugins to execute database operations that might conflict with how database connections are usually configured. For example, running a VACUUM operation while bypassing any restrictions placed by the datasette-sqlite-authorizer plugin. Running VACUUM using this method also ensures it won't trigger incorrect RenameTableEvent events, since execute_isolated_fn() does not trigger the Datasette mechanism that detects renamed tables in a way that can be confused by a VACUUM . Plugins can also use this method to load potentially dangerous SQLite extensions, use them to perform an operation and then have them safely unloaded at the end of the call, without risk of exposing them to other connections. Functions run using execute_isolated_fn() share the same queue as execute_write_fn() , which guarantees that no writes can be executed at the same time as the isolated function is executing. The return value of the function will be returned by this method. Any exceptions raised by the function will be raised out of the await line as well. ["Internals for plugins", "Database class"] [{"href": "https://github.com/datasette/datasette-sqlite-authorizer", "label": "datasette-sqlite-authorizer"}]

Advanced export

JSON shape: default, array, newline-delimited, object

CSV options:

CREATE TABLE [sections] (
   [id] TEXT PRIMARY KEY,
   [page] TEXT,
   [ref] TEXT,
   [title] TEXT,
   [content] TEXT,
   [breadcrumbs] TEXT,
   [references] TEXT
);
Powered by Datasette · Queries took 1.2ms