Instance Method
withRollbackObserver(_:body:)
Execute a block with a temporary rollback observer.
func withRollbackObserver<T>(_ callback: @escaping SQLiteConnection.SQLiteRollbackHookCallback, 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.
Throws
Any error thrown by the body block.