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

Method compare

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

Source from the content-addressed store, hash-verified

36 }
37
38 fn compare(&self, other: &Box<dyn Value>) -> Option<Ordering> {
39 if let Some(other_date) = other.as_any().downcast_ref::<DateValue>() {
40 return self.timestamp.partial_cmp(&other_date.timestamp);
41 }
42 None
43 }
44
45 fn data_type(&self) -> Box<dyn DataType> {
46 Box::new(DateType)

Callers

nothing calls this directly

Calls 2

as_anyMethod · 0.45
partial_cmpMethod · 0.45

Tested by

no test coverage detected