1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
// ─── operations/mod.rs ────────────────────────────────────────────────────────
// This module contains the core CRUD (Create, Read, Update, Delete) operations
// that mutate or query the in-memory database state.
//
// Every function here follows the same pattern:
// 1. Mutate the in-memory DashMap (instant, in RAM).
// 2. Write a LogEntry to the storage backend (persisted to disk/OPFS).
// 3. Broadcast a change event over the Tokio broadcast channel (for WebSocket
// subscribers who want real-time notifications).
//
// These functions are called by the Db methods in engine/mod.rs, which in turn
// are called by the HTTP handlers in handlers.rs and the WASM worker in worker.rs.
//
// Why separate operations from mod.rs?
// mod.rs defines the Db struct and its public API. operations contains the
// actual implementation logic. This keeps mod.rs clean and makes the
// individual operations easy to find and reason about.
// ─────────────────────────────────────────────────────────────────────────────
pub use ;
pub use insert;
pub use update;
pub use ;
pub use compact;
pub use evict_collection;
pub use recover_to;