There was an error while loading. Please reload this page.
!=
1 parent ffe3825 commit a8ff934Copy full SHA for a8ff934
2 files changed
crates/gitql-ast/src/types/row.rs
@@ -59,4 +59,8 @@ impl DataType for RowType {
59
fn can_perform_eq_op_with(&self) -> Vec<Box<dyn DataType>> {
60
vec![Box::new(self.clone())]
61
}
62
+
63
+ fn can_perform_bang_eq_op_with(&self) -> Vec<Box<dyn DataType>> {
64
+ vec![Box::new(self.clone())]
65
+ }
66
crates/gitql-core/src/values/row.rs
@@ -71,4 +71,11 @@ impl Value for RowValue {
71
72
Ok(Box::new(BoolValue::new(self.equals(other))))
73
74
75
+ fn bang_eq_op(&self, other: &Box<dyn Value>) -> Result<Box<dyn Value>, String> {
76
+ if other.as_any().downcast_ref::<RowValue>().is_none() {
77
+ return Err("Unexpected type to perform `!=` with".to_string());
78
79
+ Ok(Box::new(BoolValue::new(!self.equals(other))))
80
81
0 commit comments