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

Function joins

tests/query_test.rs:273–297  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

271
272#[test]
273fn joins() {
274 run_cases(vec![{
275 let (e, a, n) = (1, 2, 3);
276 Case {
277 description: "[:find ?e ?n ?a :where [?e :age ?a] [?e :name ?n]]",
278 plan: Plan::Project(Project {
279 variables: vec![e, n, a],
280 plan: Box::new(Plan::Join(Join {
281 variables: vec![e],
282 left_plan: Box::new(Plan::MatchA(e, ":name".to_string(), n)),
283 right_plan: Box::new(Plan::MatchA(e, ":age".to_string(), a)),
284 })),
285 }),
286 transactions: vec![vec![
287 TxData::add(1, ":name", String("Dipper".to_string())),
288 TxData::add(1, ":age", Number(12)),
289 ]],
290 expectations: vec![vec![(
291 vec![Eid(1), String("Dipper".to_string()), Number(12)],
292 0,
293 1,
294 )]],
295 }
296 }]);
297}
298
299#[test]
300fn wco_joins() {

Callers

nothing calls this directly

Calls 1

run_casesFunction · 0.70

Tested by

no test coverage detected