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

Function string_agg

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

Source from the content-addressed store, hash-verified

501
502 #[test]
503 fn string_agg() {
504 let d1 = encode(&json!({"n": "alice"}));
505 let d2 = encode(&json!({"n": "bob"}));
506 let docs: Vec<&[u8]> = vec![&d1, &d2];
507 assert_eq!(
508 compute_aggregate_binary("string_agg", "n", None, &docs),
509 Value::String("alice,bob".into())
510 );
511 }
512
513 #[test]
514 fn array_agg() {

Callers

nothing calls this directly

Calls 1

encodeFunction · 0.70

Tested by

no test coverage detected