mirror of
https://github.com/aljazceru/turso.git
synced 2026-01-06 01:34:21 +01:00
Add affinity check as a function as ast::Operator impl
This commit is contained in:
@@ -731,6 +731,21 @@ impl Operator {
|
||||
| Operator::NotEquals
|
||||
)
|
||||
}
|
||||
|
||||
/// Returns true if this operator is a comparison operator that may need affinity conversion
|
||||
pub fn is_comparison(&self) -> bool {
|
||||
matches!(
|
||||
self,
|
||||
Self::Equals
|
||||
| Self::NotEquals
|
||||
| Self::Less
|
||||
| Self::LessEquals
|
||||
| Self::Greater
|
||||
| Self::GreaterEquals
|
||||
| Self::Is
|
||||
| Self::IsNot
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
/// Unary operators
|
||||
|
||||
Reference in New Issue
Block a user