I'd like to propose adding support for the sqlite3_wal_hook in rusqlite, inspired by the existing commit_hook and rollback_hook etc. This would allow users to monitor Write-Ahead Logging (WAL) events via a safe Rust interface.
Proposed Changes:
- Feature Flag:
- Introduce a feature flag (e.g.,
"wal_hook" or added with the "hooks" feature ) to keep this functionality optional.
- Safe Callback Interface:
- Similar to
commit_hook, provide a safe Rust closure interface for the WAL hook, ensuring it adheres to Rust's borrowing and ownership rules.
- Avoid direct exposure of raw pointers, offering a safe abstraction instead.
I'd like to propose adding support for the
sqlite3_wal_hookinrusqlite, inspired by the existingcommit_hookandrollback_hooketc. This would allow users to monitor Write-Ahead Logging (WAL) events via a safe Rust interface.Proposed Changes:
"wal_hook"or added with the"hooks"feature ) to keep this functionality optional.commit_hook, provide a safe Rust closure interface for the WAL hook, ensuring it adheres to Rust's borrowing and ownership rules.