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

Function evaluate_collection_index

crates/gitql-engine/src/engine_evaluator.rs:286–295  ·  view source on GitHub ↗
(
    env: &mut Environment,
    expr: &IndexExpr,
    titles: &[String],
    object: &Vec<Box<dyn Value>>,
)

Source from the content-addressed store, hash-verified

284}
285
286fn evaluate_collection_index(
287 env: &mut Environment,
288 expr: &IndexExpr,
289 titles: &[String],
290 object: &Vec<Box<dyn Value>>,
291) -> Result<Box<dyn Value>, String> {
292 let array = evaluate_expression(env, &expr.collection, titles, object)?;
293 let index = evaluate_expression(env, &expr.index, titles, object)?;
294 array.index_op(&index)
295}
296
297fn evaluate_collection_slice(
298 env: &mut Environment,

Callers 1

evaluate_expressionFunction · 0.85

Calls 2

evaluate_expressionFunction · 0.85
index_opMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…