Skip to content

Commit

Permalink
Implemented computing parameter value
Browse files Browse the repository at this point in the history
  • Loading branch information
vignesh-j-shetty committed May 28, 2024
1 parent a1f47a0 commit cc20349
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions core/src/sql/value/fetch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,18 @@ impl Value {
Some(v) => stk.run(|stk| v.fetch(stk, ctx, opt, txn, path.next())).await,
None => Ok(()),
},
Part::Value(f) => {
let x = stk.run(|stk|f.compute(stk, ctx, opt, txn, None)).await?;
match x {
Value::Strand(s) => {
match v.get_mut(s.as_str()) {
Some(v) => stk.run(|stk| v.fetch(stk, ctx, opt, txn, path.next())).await,
None => Ok(()),
}
}
_=> Ok(())
}
}
Part::Index(i) => match v.get_mut(&i.to_string()) {
Some(v) => stk.run(|stk| v.fetch(stk, ctx, opt, txn, path.next())).await,
None => Ok(()),
Expand Down

0 comments on commit cc20349

Please sign in to comment.