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

Method compare

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

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 2

as_anyMethod · 0.45
partial_cmpMethod · 0.45

Tested by

no test coverage detected