Skip to content

Commit

Permalink
style(cognitarium): polish code a bit
Browse files Browse the repository at this point in the history
  • Loading branch information
ccamel committed Jun 17, 2023
1 parent 5876c74 commit db4f1be
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions contracts/okp4-cognitarium/src/contract.rs
Original file line number Diff line number Diff line change
Expand Up @@ -104,10 +104,11 @@ pub mod query {
Err(StdError::generic_err("Maximum query limit exceeded"))?
}

let mut plan_builder =
PlanBuilder::new(deps.storage, query.prefixes).with_limit(count as usize);
let plan =
PlanBuilder::new(deps.storage, query.prefixes).with_limit(count as usize)
.build_plan(query.r#where)?;

QueryEngine::new(deps.storage).select(plan_builder.build_plan(query.r#where)?, query.select)
QueryEngine::new(deps.storage).select(plan, query.select)
}
}

Expand Down

0 comments on commit db4f1be

Please sign in to comment.