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

Function evaluate_group_comparison

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

Source from the content-addressed store, hash-verified

370}
371
372fn evaluate_group_comparison(
373 env: &mut Environment,
374 expr: &GroupComparisonExpr,
375 titles: &[String],
376 object: &Vec<Box<dyn Value>>,
377) -> Result<Box<dyn Value>, String> {
378 let lhs = evaluate_expression(env, &expr.left, titles, object)?;
379 let rhs = evaluate_expression(env, &expr.right, titles, object)?;
380 match expr.comparison_operator {
381 ComparisonOperator::Greater => lhs.group_gt_op(&rhs, &expr.group_operator),
382 ComparisonOperator::GreaterEqual => lhs.group_gte_op(&rhs, &expr.group_operator),
383 ComparisonOperator::Less => lhs.group_lt_op(&rhs, &expr.group_operator),
384 ComparisonOperator::LessEqual => lhs.group_lte_op(&rhs, &expr.group_operator),
385 ComparisonOperator::Equal => lhs.group_eq_op(&rhs, &expr.group_operator),
386 ComparisonOperator::NotEqual => lhs.group_bang_eq_op(&rhs, &expr.group_operator),
387 ComparisonOperator::NullSafeEqual => lhs.group_null_safe_eq_op(&rhs, &expr.group_operator),
388 }
389}
390
391fn evaluate_contains(
392 env: &mut Environment,

Callers 1

evaluate_expressionFunction · 0.85

Calls 8

evaluate_expressionFunction · 0.85
group_null_safe_eq_opMethod · 0.80
group_gt_opMethod · 0.45
group_gte_opMethod · 0.45
group_lt_opMethod · 0.45
group_lte_opMethod · 0.45
group_eq_opMethod · 0.45
group_bang_eq_opMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…