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

Method equals

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

Source from the content-addressed store, hash-verified

35 }
36
37 fn equals(&self, other: &Box<dyn Value>) -> bool {
38 if let Some(other_row) = other.as_any().downcast_ref::<RowValue>() {
39 let data_type: Box<dyn DataType> = Box::new(other_row.row_type.clone());
40 if !self.row_type.equals(&data_type) {
41 return false;
42 }
43
44 let len = self.row_type.tuple.len();
45 for i in 0..len {
46 if !self.columns[i].eq(&other_row.columns[i]) {
47 return false;
48 }
49 }
50
51 return true;
52 }
53 false
54 }
55
56 fn compare(&self, _other: &Box<dyn Value>) -> Option<Ordering> {
57 None

Callers 3

eq_opMethod · 0.45
bang_eq_opMethod · 0.45
eqMethod · 0.45

Calls 3

as_anyMethod · 0.45
lenMethod · 0.45
eqMethod · 0.45

Tested by

no test coverage detected