(&self)
| 1067 | |
| 1068 | impl SQLExpression for sql_ast::Expr { |
| 1069 | fn binding_strength(&self) -> i32 { |
| 1070 | // Strength of an expression depends only on the top-level operator, because all |
| 1071 | // other nested expressions can only have lower strength |
| 1072 | match self { |
| 1073 | sql_ast::Expr::BinaryOp { op, .. } => op.binding_strength(), |
| 1074 | |
| 1075 | sql_ast::Expr::UnaryOp { op, .. } => op.binding_strength(), |
| 1076 | |
| 1077 | sql_ast::Expr::Like { .. } | sql_ast::Expr::ILike { .. } => 7, |
| 1078 | |
| 1079 | sql_ast::Expr::IsNull(_) | sql_ast::Expr::IsNotNull(_) => 5, |
| 1080 | |
| 1081 | // all other items types bind stronger (function calls, literals, ...) |
| 1082 | _ => 20, |
| 1083 | } |
| 1084 | } |
| 1085 | fn associativity(&self) -> Associativity { |
| 1086 | match self { |
| 1087 | sql_ast::Expr::BinaryOp { op, .. } => op.associativity(), |
no outgoing calls
no test coverage detected