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§
- Shared
Sqlite - Clonable handle onto a
SqliteStore’s connection pool and serialization semaphore. Obtained viaSqliteStore::shared. Holding one does not keep any device row alive — it is purely connection plumbing. - Sqlite
Store - Sqlite
Store Config - Per-store connection tuning.
Defaultis a low-memory profile sized for oneSqliteStoreper 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. Raisepool_sizefor real concurrent DB access — it drives both the pool and the internal serialization in lockstep — orcache_size_kibfor a hotter/larger DB; pass athread_poolto control r2d2’s management threads (e.g. share your own across crates).
Enums§
- Synchronous
PRAGMA synchronousdurability level for a store’s connections.
Type Aliases§
- Connection
Init Hook - 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, wherePRAGMA keymust be the first statement on a fresh connection; it equally serves loading extensions or custom per-connection pragmas.