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

Method value_to_string

graphlite/src/exec/executor.rs:5448–5458  ·  view source on GitHub ↗

Convert a Value to a string representation for concatenation

(&self, value: &Value)

Source from the content-addressed store, hash-verified

5446
5447 /// Convert a Value to a string representation for concatenation
5448 fn value_to_string(&self, value: &Value) -> Result<String, ExecutionError> {
5449 match value {
5450 Value::String(s) => Ok(s.clone()),
5451 Value::Number(n) => Ok(n.to_string()),
5452 Value::Boolean(b) => Ok(b.to_string()),
5453 Value::Null => Err(ExecutionError::TypeError(
5454 "Cannot concatenate with NULL".to_string(),
5455 )),
5456 _ => Ok(format!("{:?}", value)), // Fallback for other types
5457 }
5458 }
5459
5460 /// Match a string against a LIKE pattern with SQL-style wildcards
5461 fn match_like_pattern(&self, text: &str, pattern: &str) -> Result<Value, ExecutionError> {

Callers 1

evaluate_binary_opMethod · 0.45

Calls 2

TypeErrorEnum · 0.85
cloneMethod · 0.80

Tested by

no test coverage detected