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

Function pull_level

tests/pull_test.rs:118–161  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

116
117#[test]
118fn pull_level() {
119 run_cases(vec![Case {
120 description: "[:find (pull ?e [:name :age]) :where [?e :admin? false]]",
121 plan: Plan::PullLevel(PullLevel {
122 variables: vec![],
123 pull_variable: 0,
124 plan: Box::new(Plan::MatchAV(0, "admin?".to_string(), Bool(false))),
125 pull_attributes: vec!["name".to_string(), "age".to_string()],
126 path_attributes: vec![],
127 cardinality_many: false,
128 }),
129 transactions: vec![vec![
130 TxData::add(100, "admin?", Bool(true)),
131 TxData::add(200, "admin?", Bool(false)),
132 TxData::add(300, "admin?", Bool(false)),
133 TxData::add(100, "name", String("Mabel".to_string())),
134 TxData::add(200, "name", String("Dipper".to_string())),
135 TxData::add(300, "name", String("Soos".to_string())),
136 TxData::add(100, "age", Number(12)),
137 TxData::add(200, "age", Number(13)),
138 ]],
139 expectations: vec![vec![
140 (vec![Eid(200), Aid("age".to_string()), Number(13)], 0, 1),
141 (
142 vec![
143 Eid(200),
144 Aid("name".to_string()),
145 String("Dipper".to_string()),
146 ],
147 0,
148 1,
149 ),
150 (
151 vec![
152 Eid(300),
153 Aid("name".to_string()),
154 String("Soos".to_string()),
155 ],
156 0,
157 1,
158 ),
159 ]],
160 }]);
161}
162
163#[cfg(feature = "graphql")]
164#[test]

Callers

nothing calls this directly

Calls 1

run_casesFunction · 0.70

Tested by

no test coverage detected