(
(side, with, filter): (JoinSide, RelationExpr, Expr),
ctx: &mut Context,
)
| 404 | } |
| 405 | |
| 406 | fn translate_join( |
| 407 | (side, with, filter): (JoinSide, RelationExpr, Expr), |
| 408 | ctx: &mut Context, |
| 409 | ) -> Result<Join> { |
| 410 | let relation = translate_relation_expr(with, ctx)?; |
| 411 | |
| 412 | let constraint = JoinConstraint::On(translate_expr(filter, ctx)?.into_ast()); |
| 413 | |
| 414 | Ok(Join { |
| 415 | relation, |
| 416 | join_operator: match side { |
| 417 | JoinSide::Inner => JoinOperator::Inner(constraint), |
| 418 | JoinSide::Left => JoinOperator::LeftOuter(constraint), |
| 419 | JoinSide::Right => JoinOperator::RightOuter(constraint), |
| 420 | JoinSide::Full => JoinOperator::FullOuter(constraint), |
| 421 | }, |
| 422 | global: false, |
| 423 | }) |
| 424 | } |
| 425 | |
| 426 | fn translate_cte(cte: Cte, ctx: &mut Context) -> Result<(sql_ast::Cte, bool)> { |
| 427 | let decl = ctx.anchor.lookup_table_decl(&cte.tid).unwrap(); |
no test coverage detected