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

Method compare

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

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 2

as_anyMethod · 0.45
partial_cmpMethod · 0.45

Tested by

no test coverage detected