MCPcopy Create free account
hub / github.com/AmrDeveloper/GQL / evaluate_symbol

Function evaluate_symbol

crates/gitql-engine/src/engine_evaluator.rs:231–242  ·  view source on GitHub ↗
(
    expr: &SymbolExpr,
    titles: &[String],
    object: &[Box<dyn Value>],
)

Source from the content-addressed store, hash-verified

229}
230
231fn evaluate_symbol(
232 expr: &SymbolExpr,
233 titles: &[String],
234 object: &[Box<dyn Value>],
235) -> Result<Box<dyn Value>, String> {
236 for (index, title) in titles.iter().enumerate() {
237 if expr.value.eq(title) {
238 return Ok(object[index].clone());
239 }
240 }
241 Err(format!("Invalid column name `{}`", &expr.value))
242}
243
244fn evaluate_array(
245 env: &mut Environment,

Callers 1

evaluate_expressionFunction · 0.85

Calls 1

eqMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…