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

Method compare

crates/gitql-core/src/values/time.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_time) = other.as_any().downcast_ref::<TimeValue>() {
36 return self.value.partial_cmp(&other_time.value);
37 }
38 None
39 }
40
41 fn data_type(&self) -> Box<dyn DataType> {
42 Box::new(TimeType)

Callers

nothing calls this directly

Calls 2

as_anyMethod · 0.45
partial_cmpMethod · 0.45

Tested by

no test coverage detected