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

Method values_equal

graphlite/src/exec/executor.rs:4878–4886  ·  view source on GitHub ↗

Check if two values are equal for CASE comparison

(&self, left: &Value, right: &Value)

Source from the content-addressed store, hash-verified

4876
4877 /// Check if two values are equal for CASE comparison
4878 fn values_equal(&self, left: &Value, right: &Value) -> Result<bool, ExecutionError> {
4879 match (left, right) {
4880 (Value::String(l), Value::String(r)) => Ok(l == r),
4881 (Value::Number(l), Value::Number(r)) => Ok((l - r).abs() < f64::EPSILON),
4882 (Value::Boolean(l), Value::Boolean(r)) => Ok(l == r),
4883 (Value::Null, Value::Null) => Ok(true),
4884 _ => Ok(false), // Different types are not equal
4885 }
4886 }
4887
4888 /// Check if a value is truthy for CASE condition evaluation
4889 fn is_truthy(&self, value: &Value) -> Result<bool, ExecutionError> {

Callers 3

evaluate_expressionMethod · 0.80
evaluate_simple_caseMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected