Skip to main content

Crate whatsapp_rust_sqlite_storage

Crate whatsapp_rust_sqlite_storage 

Source
Expand description

SQLite storage backend for whatsapp-rust

This crate provides a SQLite-based storage implementation for the whatsapp-rust library. It implements all the required storage traits from wacore::store::traits.

Structs§

SharedSqlite
Clonable handle onto a SqliteStore’s connection pool and serialization semaphore. Obtained via SqliteStore::shared. Holding one does not keep any device row alive — it is purely connection plumbing.
SqliteStore
SqliteStoreConfig
Per-store connection tuning. Default is a low-memory profile sized for one SqliteStore per WhatsApp session on a single process: a single pooled connection (operations are serialized internally, so a second would only idle) sharing one process-wide r2d2 thread pool, with a 512 KiB page cache. Raise pool_size for real concurrent DB access — it drives both the pool and the internal serialization in lockstep — or cache_size_kib for a hotter/larger DB; pass a thread_pool to control r2d2’s management threads (e.g. share your own across crates).

Enums§

Synchronous
PRAGMA synchronous durability level for a store’s connections.

Type Aliases§

ConnectionInitHook
Per-connection initialization hook, run at the start of on_acquire — before any of the store’s own pragmas, and (because WAL setup and migrations run on a pooled connection) before those too. This ordering is what makes the hook usable for SQLCipher-style keying, where PRAGMA key must be the first statement on a fresh connection; it equally serves loading extensions or custom per-connection pragmas.