(
left: &rq::Expr,
right: &rq::Expr,
op: BinaryOperator,
ctx: &mut Context,
)
| 385 | } |
| 386 | |
| 387 | fn translate_binary_operator( |
| 388 | left: &rq::Expr, |
| 389 | right: &rq::Expr, |
| 390 | op: BinaryOperator, |
| 391 | ctx: &mut Context, |
| 392 | ) -> Result<sql_ast::Expr> { |
| 393 | let strength = op.binding_strength(); |
| 394 | |
| 395 | let left = translate_operand(left.clone(), true, strength, op.associativity(), ctx)?; |
| 396 | let right = translate_operand(right.clone(), false, strength, op.associativity(), ctx)?; |
| 397 | |
| 398 | let left = Box::new(left.into_ast()); |
| 399 | let right = Box::new(right.into_ast()); |
| 400 | |
| 401 | Ok(sql_ast::Expr::BinaryOp { left, op, right }) |
| 402 | } |
| 403 | |
| 404 | fn collect_concat_args(expr: &rq::Expr) -> Vec<&rq::Expr> { |
| 405 | match &expr.kind { |
no test coverage detected