File tree Expand file tree Collapse file tree 3 files changed +7
-1
lines changed Expand file tree Collapse file tree 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> {
118118 "multiply" => Some ( Operator :: Multiply ) ,
119119 "divide" => Some ( Operator :: Divide ) ,
120120 "mod" => Some ( Operator :: Modulo ) ,
121+ "modulus" => Some ( Operator :: Modulo ) ,
121122 "and" => Some ( Operator :: And ) ,
122123 "or" => Some ( Operator :: Or ) ,
123124 "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 {
744744 Operator :: Minus => "subtract" ,
745745 Operator :: Multiply => "multiply" ,
746746 Operator :: Divide => "divide" ,
747- Operator :: Modulo => "mod " ,
747+ Operator :: Modulo => "modulus " ,
748748 Operator :: And => "and" ,
749749 Operator :: Or => "or" ,
750750 Operator :: IsDistinctFrom => "is_distinct_from" ,
Original file line number Diff line number Diff line change @@ -593,6 +593,11 @@ async fn roundtrip_ilike() -> Result<()> {
593593 roundtrip ( "SELECT f FROM data WHERE f ILIKE 'a%b'" ) . await
594594}
595595
596+ #[ tokio:: test]
597+ async fn roundtrip_modulus ( ) -> Result < ( ) > {
598+ roundtrip ( "SELECT a%3 from data" ) . await
599+ }
600+
596601#[ tokio:: test]
597602async fn roundtrip_not ( ) -> Result < ( ) > {
598603 roundtrip ( "SELECT * FROM data WHERE NOT d" ) . await
You can’t perform that action at this time.
0 commit comments