MCPcopy Create free account
hub / github.com/comnik/declarative-dataflow / wco_join_many

Function wco_join_many

tests/query_test.rs:379–427  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

377
378#[test]
379fn wco_join_many() {
380 let data = vec![
381 TxData::add(1, ":name", String("Ivan".to_string())),
382 TxData::add(1, ":aka", String("ivolga".to_string())),
383 TxData::add(1, ":aka", String("pi".to_string())),
384 TxData::add(2, ":name", String("Petr".to_string())),
385 TxData::add(2, ":aka", String("porosenok".to_string())),
386 TxData::add(2, ":aka", String("pi".to_string())),
387 ];
388
389 let (e1, x, e2, n1, n2) = (0, 1, 2, 3, 4);
390
391 run_cases(vec![Case {
392 description:
393 "[:find ?n1 ?n2 :where [?e1 :aka ?x] [?e2 :aka ?x] [?e1 :name ?n1] [?e2 :name ?n2]]",
394 plan: q(
395 vec![n1, n2],
396 vec![
397 Binding::attribute(e1, ":aka", x),
398 Binding::attribute(e2, ":aka", x),
399 Binding::attribute(e1, ":name", n1),
400 Binding::attribute(e2, ":name", n2),
401 ],
402 ),
403 transactions: vec![data.clone()],
404 expectations: vec![vec![
405 (
406 vec![String("Ivan".to_string()), String("Ivan".to_string())],
407 0,
408 2,
409 ),
410 (
411 vec![String("Petr".to_string()), String("Petr".to_string())],
412 0,
413 2,
414 ),
415 (
416 vec![String("Ivan".to_string()), String("Petr".to_string())],
417 0,
418 1,
419 ),
420 (
421 vec![String("Petr".to_string()), String("Ivan".to_string())],
422 0,
423 1,
424 ),
425 ]],
426 }]);
427}
428
429// @TODO
430// {

Callers

nothing calls this directly

Calls 1

run_casesFunction · 0.70

Tested by

no test coverage detected