File tree 3 files changed +7
-1
lines changed
3 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -118,6 +118,7 @@ pub fn name_to_op(name: &str) -> Option<Operator> {
118
118
"multiply" => Some ( Operator :: Multiply ) ,
119
119
"divide" => Some ( Operator :: Divide ) ,
120
120
"mod" => Some ( Operator :: Modulo ) ,
121
+ "modulus" => Some ( Operator :: Modulo ) ,
121
122
"and" => Some ( Operator :: And ) ,
122
123
"or" => Some ( Operator :: Or ) ,
123
124
"is_distinct_from" => Some ( Operator :: IsDistinctFrom ) ,
Original file line number Diff line number Diff line change @@ -744,7 +744,7 @@ pub fn operator_to_name(op: Operator) -> &'static str {
744
744
Operator :: Minus => "subtract" ,
745
745
Operator :: Multiply => "multiply" ,
746
746
Operator :: Divide => "divide" ,
747
- Operator :: Modulo => "mod " ,
747
+ Operator :: Modulo => "modulus " ,
748
748
Operator :: And => "and" ,
749
749
Operator :: Or => "or" ,
750
750
Operator :: IsDistinctFrom => "is_distinct_from" ,
Original file line number Diff line number Diff line change @@ -593,6 +593,11 @@ async fn roundtrip_ilike() -> Result<()> {
593
593
roundtrip ( "SELECT f FROM data WHERE f ILIKE 'a%b'" ) . await
594
594
}
595
595
596
+ #[ tokio:: test]
597
+ async fn roundtrip_modulus ( ) -> Result < ( ) > {
598
+ roundtrip ( "SELECT a%3 from data" ) . await
599
+ }
600
+
596
601
#[ tokio:: test]
597
602
async fn roundtrip_not ( ) -> Result < ( ) > {
598
603
roundtrip ( "SELECT * FROM data WHERE NOT d" ) . await
You can’t perform that action at this time.
0 commit comments