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

Function rows_to_msgpack_format

nodedb/src/engine/graph/pattern/executor/mod.rs:508–516  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

506
507 #[test]
508 fn rows_to_msgpack_format() {
509 let mut row = BindingRow::new();
510 row.insert("a".into(), "alice".into());
511 row.insert("b".into(), "bob".into());
512 let msgpack = rows_to_msgpack(&[row]).unwrap();
513 let json = nodedb_types::json_from_msgpack(&msgpack).unwrap();
514 let arr = json.as_array().unwrap();
515 assert_eq!(arr[0]["a"], "alice");
516 }
517
518 /// Anchor nodes not in the frontier bitmap are never expanded as sources.
519 /// alice (surrogate 1) is in the bitmap; bob and carol (surrogates 2, 3)

Callers

nothing calls this directly

Calls 4

rows_to_msgpackFunction · 0.85
json_from_msgpackFunction · 0.85
as_arrayMethod · 0.80
insertMethod · 0.45

Tested by

no test coverage detected