1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
//! Module: query::plan::expr::truth_value
//! Responsibility: evaluated-value truth admission for expression boolean
//! contexts.
//! Does not own: expression canonicalization, predicate compilation, type
//! inference, or projection materialization.
//! Boundary: consumes already-evaluated `Value` results and answers whether
//! they pass TRUE-only SQL admission.
//!
//! Truth semantics contract:
//! - `Value::Bool(true)` is the only value that is admitted as TRUE.
//! - `Value::Bool(false)` is FALSE and does not pass TRUE-only admission.
//! - `Value::Null` represents SQL UNKNOWN for boolean admission and does not
//! pass TRUE-only admission.
//! - IcyDB does not expose a separate UNKNOWN value variant; expression
//! evaluation carries UNKNOWN as `Value::Null` until this boundary.
//! - Any other value is invalid in an already-typed boolean context and must be
//! reported by the caller through the supplied error constructor.
use crateValue;
/// Admit one borrowed evaluated boolean-context value through the shared
/// TRUE-only policy without forcing callers that already hold row-local values
/// to clone on the successful path.
pub
/// Collapse one evaluated boolean-context value through the shared TRUE-only
/// admission boundary used by WHERE-style row filtering, grouped HAVING, CASE
/// branch selection, and aggregate FILTER semantics.
pub