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

Method logical_or_op

crates/gitql-core/src/values/array.rs:140–152  ·  view source on GitHub ↗
(&self, other: &Box<dyn Value>)

Source from the content-addressed store, hash-verified

138 }
139
140 fn logical_or_op(&self, other: &Box<dyn Value>) -> Result<Box<dyn Value>, String> {
141 if let Some(other_array) = other.as_any().downcast_ref::<ArrayValue>() {
142 for value in self.values.iter() {
143 for other_value in other_array.values.iter() {
144 if value.equals(other_value) {
145 return Ok(Box::new(BoolValue { value: true }));
146 }
147 }
148 }
149 return Ok(Box::new(BoolValue::new_false()));
150 }
151 Err("Unexpected Array overlap type".to_string())
152 }
153
154 fn contains_op(&self, other: &Box<dyn Value>) -> Result<Box<dyn Value>, String> {
155 for value in self.values.iter() {

Callers 1

evaluate_logicalFunction · 0.45

Calls 2

as_anyMethod · 0.45
equalsMethod · 0.45

Tested by

no test coverage detected