Instance Method
withCommitObserver(_:body:)
Execute a block with a temporary commit observer.
func withCommitObserver<T>(_ callback: @escaping SQLiteConnection.SQLiteCommitObserver, body: () async throws -> T) async throws -> T
Parameters
callbackThe observer callback to register temporarily.
bodyThe block to execute with the observer active.
Return Value
The return value of the body block.
Discussion
The observer is automatically removed when the block completes. Observers cannot veto commits - they are for logging and metrics only.
Throws
Any error thrown by the body block.