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

Function count

nodedb-query/src/msgpack_scan/aggregate.rs:433–442  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

431
432 #[test]
433 fn count() {
434 let d1 = encode(&json!({"x": 1}));
435 let d2 = encode(&json!({"x": 2}));
436 let d3 = encode(&json!({"x": 3}));
437 let docs: Vec<&[u8]> = vec![&d1, &d2, &d3];
438 assert_eq!(
439 compute_aggregate_binary("count", "x", None, &docs),
440 Value::Integer(3)
441 );
442 }
443
444 #[test]
445 fn sum() {

Callers

nothing calls this directly

Calls 1

encodeFunction · 0.70

Tested by

no test coverage detected