MCPcopy Create free account
hub / github.com/NodeDB-Lab/nodedb / overwrite_document

Function overwrite_document

nodedb/src/engine/document/store/engine/tests.rs:52–65  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

50
51#[test]
52fn overwrite_document() {
53 let (sparse, _dir) = make_engine();
54 let doc_engine = DocumentEngine::new(&sparse, 1);
55
56 doc_engine
57 .put("users", "u1", &serde_json::json!({"v": 1}))
58 .unwrap();
59 doc_engine
60 .put("users", "u1", &serde_json::json!({"v": 2}))
61 .unwrap();
62
63 let doc = doc_engine.get("users", "u1").unwrap().unwrap();
64 assert_eq!(doc["v"], 2);
65}
66
67#[test]
68fn secondary_index_extraction() {

Callers

nothing calls this directly

Calls 3

make_engineFunction · 0.70
putMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected