MCPcopy Create free account
hub / github.com/GraphLite-AI/GraphLite / sql_set_equal_named

Method sql_set_equal_named

graphlite/src/exec/result.rs:330–350  ·  view source on GitHub ↗

SQL set operation equality for named values

(&self, other: &Self)

Source from the content-addressed store, hash-verified

328
329 /// SQL set operation equality for named values
330 fn sql_set_equal_named(&self, other: &Self) -> bool {
331 if self.values.len() != other.values.len() {
332 return false;
333 }
334
335 for (key, self_val) in &self.values {
336 if let Some(other_val) = other.values.get(key) {
337 // In SQL set operations, NULL != NULL
338 if matches!(self_val, Value::Null) || matches!(other_val, Value::Null) {
339 return false;
340 }
341 if self_val != other_val {
342 return false;
343 }
344 } else {
345 return false;
346 }
347 }
348
349 true
350 }
351}
352
353impl Eq for Row {}

Callers 1

eqMethod · 0.80

Calls 2

lenMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected