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

Method evaluate_cast_expression

graphlite/src/exec/executor.rs:4955–4965  ·  view source on GitHub ↗

Evaluate a CAST expression: CAST(expr AS type-spec)

(
        &self,
        cast_expr: &crate::ast::CastExpression,
        context: &ExecutionContext,
    )

Source from the content-addressed store, hash-verified

4953
4954 /// Evaluate a CAST expression: CAST(expr AS type-spec)
4955 fn evaluate_cast_expression(
4956 &self,
4957 cast_expr: &crate::ast::CastExpression,
4958 context: &ExecutionContext,
4959 ) -> Result<Value, ExecutionError> {
4960 // First evaluate the source expression
4961 let source_value = self.evaluate_expression(&cast_expr.expression, context)?;
4962
4963 // Perform the cast based on the target type
4964 self.cast_value(source_value, &cast_expr.target_type)
4965 }
4966
4967 /// Cast a value to a target type
4968 fn cast_value(

Callers 2

evaluate_expressionMethod · 0.80

Calls 2

cast_valueMethod · 0.80
evaluate_expressionMethod · 0.45

Tested by

no test coverage detected