toasty 0.4.0

An async ORM for Rust supporting SQL and NoSQL databases
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use toasty_core::stmt;

use crate::engine::simplify::Simplify;

impl Simplify<'_> {
    pub(super) fn simplify_expr_exists(
        &self,
        expr_exists: &stmt::ExprExists,
    ) -> Option<stmt::Expr> {
        // `exists(empty_query)` → `false`
        if self.stmt_query_is_empty(&expr_exists.subquery) {
            return Some(stmt::Expr::FALSE);
        }

        None
    }
}