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

Function evaluate_in

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

Source from the content-addressed store, hash-verified

560}
561
562fn evaluate_in(
563 env: &mut Environment,
564 expr: &InExpr,
565 titles: &[String],
566 object: &Vec<Box<dyn Value>>,
567) -> Result<Box<dyn Value>, String> {
568 let argument = evaluate_expression(env, &expr.argument, titles, object)?;
569 for value_expr in &expr.values {
570 let value = evaluate_expression(env, value_expr, titles, object)?;
571 if argument.equals(&value) {
572 return Ok(Box::new(BoolValue::new(!expr.has_not_keyword)));
573 }
574 }
575 Ok(Box::new(BoolValue::new(expr.has_not_keyword)))
576}
577
578fn evaluate_is_null(
579 env: &mut Environment,

Callers 1

evaluate_expressionFunction · 0.85

Calls 2

evaluate_expressionFunction · 0.85
equalsMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…