Skip to content

Commit

Permalink
feat(cognitarium): handle query engine skip node
Browse files Browse the repository at this point in the history
  • Loading branch information
amimart committed Jun 5, 2023
1 parent 9fa3b9d commit 65e09ee
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion contracts/okp4-cognitarium/src/querier/engine.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,12 @@ impl<'a> QueryEngine<'a> {
Box::new(move |_| Box::new(iter::empty()))
}
QueryNode::ForLoopJoin { left, right } => Box::new(move |_| Box::new(iter::empty())),
QueryNode::Skip { child, first } => Box::new(move |_| Box::new(iter::empty())),
QueryNode::Skip { child, first } => {
let upstream = self.eval_node(child);
Box::new(move |vars| -> ResolvedVariablesIterator {
Box::new(upstream(vars).skip(first))
})
}
QueryNode::Limit { child, first } => {
let upstream = self.eval_node(child);
Box::new(move |vars| -> ResolvedVariablesIterator {
Expand Down

0 comments on commit 65e09ee

Please sign in to comment.