MCPcopy Create free account
hub / github.com/GraphLite-AI/GraphLite / evaluate_case_expression

Method evaluate_case_expression

graphlite/src/exec/executor.rs:4811–4824  ·  view source on GitHub ↗

Evaluate a CASE expression

(
        &self,
        case_expr: &crate::ast::CaseExpression,
        context: &ExecutionContext,
    )

Source from the content-addressed store, hash-verified

4809
4810 /// Evaluate a CASE expression
4811 fn evaluate_case_expression(
4812 &self,
4813 case_expr: &crate::ast::CaseExpression,
4814 context: &ExecutionContext,
4815 ) -> Result<Value, ExecutionError> {
4816 use crate::ast::CaseType;
4817
4818 match &case_expr.case_type {
4819 CaseType::Simple(simple_case) => self.evaluate_simple_case(simple_case, context),
4820 CaseType::Searched(searched_case) => {
4821 self.evaluate_searched_case(searched_case, context)
4822 }
4823 }
4824 }
4825
4826 /// Evaluate a simple CASE expression (CASE expr WHEN value1 THEN result1 ...)
4827 fn evaluate_simple_case(

Calls 2

evaluate_simple_caseMethod · 0.80

Tested by

no test coverage detected