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

Function incr_existing_key

nodedb/src/engine/kv/engine_atomic.rs:489–494  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

487
488 #[test]
489 fn incr_existing_key() {
490 let mut engine = make_engine();
491 engine.incr(1, "counters", b"hits", 10, 0, 1000).unwrap();
492 let result = engine.incr(1, "counters", b"hits", 5, 0, 1000);
493 assert_eq!(result.unwrap(), 15);
494 }
495
496 #[test]
497 fn incr_negative_delta() {

Callers

nothing calls this directly

Calls 2

incrMethod · 0.80
make_engineFunction · 0.70

Tested by

no test coverage detected