mirror of
https://github.com/aljazceru/turso.git
synced 2026-01-05 17:24:21 +01:00
Implement where and
This commit is contained in:
@@ -569,6 +569,25 @@ fn translate_condition_expr(
|
||||
select: &Select,
|
||||
expr: &ast::Expr,
|
||||
jump_target: BranchOffset,
|
||||
) -> Result<()> {
|
||||
match expr {
|
||||
ast::Expr::Binary(e1, op, e2) => match op {
|
||||
ast::Operator::And => {
|
||||
let _ = translate_condition_expr(program, select, e1, jump_target)?;
|
||||
let _ = translate_condition_expr(program, select, e2, jump_target)?;
|
||||
Ok(())
|
||||
}
|
||||
_ => translate_condition_expr_leaf(program, select, expr, jump_target),
|
||||
},
|
||||
_ => translate_condition_expr_leaf(program, select, expr, jump_target),
|
||||
}
|
||||
}
|
||||
|
||||
fn translate_condition_expr_leaf(
|
||||
program: &mut ProgramBuilder,
|
||||
select: &Select,
|
||||
expr: &ast::Expr,
|
||||
jump_target: BranchOffset,
|
||||
) -> Result<()> {
|
||||
match expr {
|
||||
ast::Expr::Between { .. } => todo!(),
|
||||
|
||||
Reference in New Issue
Block a user