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

Method compare

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

Source from the content-addressed store, hash-verified

32 }
33
34 fn compare(&self, other: &Box<dyn Value>) -> Option<Ordering> {
35 if let Some(other_interval) = other.as_any().downcast_ref::<IntervalValue>() {
36 return self.interval.partial_cmp(&other_interval.interval);
37 }
38 None
39 }
40
41 fn data_type(&self) -> Box<dyn DataType> {
42 Box::new(IntervalType)

Callers

nothing calls this directly

Calls 2

as_anyMethod · 0.45
partial_cmpMethod · 0.45

Tested by

no test coverage detected