Skip to content

Add safe exposure of sqlite3_wal_hook  #1570

Description

@vincent-herlemont

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:

  1. Feature Flag:
    • Introduce a feature flag (e.g., "wal_hook" or added with the "hooks" feature ) to keep this functionality optional.
  2. 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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions