moltendb-core 0.10.1

MoltenDB core engine — in-memory DashMap storage, WAL persistence, query evaluation. No HTTP, no auth.
Documentation
1
2
3
4
5
6
7
8
9
use serde_json::{Value, json};
use crate::engine;

pub fn process_snapshot(db: &engine::Db) -> (u16, Value) {
    match db.compact() {
        Ok(_) => (200, json!({ "status": "ok", "message": "Snapshot taken successfully" })),
        Err(e) => (500, json!({ "error": "Failed to take snapshot", "details": e.to_string(), "statusCode": 500 }))
    }
}