sections: changelog:write-wrapper-plugin-hook-for-intercepting-write-operations
This data as json
| id | page | ref | title | content | breadcrumbs | references |
|---|---|---|---|---|---|---|
| changelog:write-wrapper-plugin-hook-for-intercepting-write-operations | changelog | write-wrapper-plugin-hook-for-intercepting-write-operations | A new write_wrapper() plugin hook allows plugins to intercept and wrap database write operations. ( #2636 ) Plugins implement the hook as a generator-based context manager: @hookimpl def write_wrapper(datasette, database, request): def wrapper(conn): # Setup code runs before the write yield # Cleanup code runs after the write return wrapper | ["Changelog", "1.0a25 (2026-02-25)"] | [{"href": "https://github.com/simonw/datasette/pull/2636", "label": "#2636"}] |