mybatis_sql/
ops_not.rs

1use crate::ops::Not;
2
3use crate::ops::Value;
4
5impl Not for Value {
6    type Output = bool;
7
8    fn op_not(self) -> Self::Output {
9        match self {
10            Value::Boolean(b) => !b,
11            _ => true,
12        }
13    }
14}
15
16impl Not for &Value {
17    type Output = bool;
18    fn op_not(self) -> Self::Output {
19        match self {
20            Value::Boolean(b) => !*b,
21            _ => true,
22        }
23    }
24}
25
26impl Not for &mut Value {
27    type Output = bool;
28    fn op_not(self) -> Self::Output {
29        match self {
30            Value::Boolean(b) => !*b,
31            _ => true,
32        }
33    }
34}