Type Alias
SQLiteConnection.SQLiteCommitValidator
The type signature for commit validator callbacks (can veto commits).
typealias SQLiteCommitValidator = @Sendable (SQLiteCommitEvent) -> SQLiteCommitResponse
Parameters
eventA
SQLiteCommitEventcontaining details about the commit attempt.
Return Value
A SQLiteCommitResponse indicating whether to allow or deny the commit.
Discussion
Commit validators can examine the transaction and decide whether to allow or deny the commit. Use this for business rule validation, constraints, or access control.
Note
Callbacks run on SQLite’s internal thread. Hop to an actor or event loop as needed.