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

Function array_agg

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

Source from the content-addressed store, hash-verified

512
513 #[test]
514 fn array_agg() {
515 let d1 = encode(&json!({"v": 1}));
516 let d2 = encode(&json!({"v": 2}));
517 let docs: Vec<&[u8]> = vec![&d1, &d2];
518 let result = compute_aggregate_binary("array_agg", "v", None, &docs);
519 assert_eq!(
520 result,
521 Value::Array(vec![Value::Integer(1), Value::Integer(2),])
522 );
523 }
524
525 #[test]
526 fn stddev_pop() {

Callers

nothing calls this directly

Calls 2

compute_aggregate_binaryFunction · 0.85
encodeFunction · 0.70

Tested by

no test coverage detected