miniproto.session.storage.EncryptedSQLiteSessionStorage.mutate
miniproto.session.storage.EncryptedSQLiteSessionStorage.mutate
Section titled “miniproto.session.storage.EncryptedSQLiteSessionStorage.mutate”mutate(transform: Callable[[Mapping[str, Any] | None], SessionPayload | None]) -> Mapping[str, Any] | NoneAtomically transform detached state under SQLite’s write transaction.
The transform must be synchronous; it executes while the backend lock and
BEGIN IMMEDIATE transaction ensure no lost update.
Parameters:
- transform (
Callable[[Mapping[str, Any] | None], SessionPayload | None]) – Synchronous callback receiving a detached current snapshot.