Add starts with operator (#5061)

* add starts_with operator

* added a test
This commit is contained in:
Darren Schroeder
2022-04-01 13:35:46 -05:00
committed by GitHub
parent a088081695
commit 2cb815b7b4
8 changed files with 68 additions and 0 deletions

View File

@ -34,6 +34,7 @@ impl Expression {
Operator::Plus | Operator::Minus => 90,
Operator::NotContains
| Operator::Contains
| Operator::StartsWith
| Operator::LessThan
| Operator::LessThanOrEqual
| Operator::GreaterThan

View File

@ -23,6 +23,7 @@ pub enum Operator {
And,
Or,
Pow,
StartsWith,
}
impl Display for Operator {
@ -46,6 +47,7 @@ impl Display for Operator {
Operator::Pow => write!(f, "**"),
Operator::LessThanOrEqual => write!(f, "<="),
Operator::GreaterThanOrEqual => write!(f, ">="),
Operator::StartsWith => write!(f, "=^"),
}
}
}