pub enum AssertionPredicate {
Eq(String),
NotNull,
IsNull,
Gte(f64),
Lte(f64),
Contains(String),
MalformedBound {
key: String,
raw: String,
},
MinRows(u64),
}Expand description
Predicate for field assertion checks.
Variants§
Eq(String)
Field must equal this value (string comparison).
NotNull
Field must not be null/absent.
IsNull
Field must be null/absent.
Gte(f64)
Numeric: field >= threshold.
Lte(f64)
Numeric: field <= threshold.
Contains(String)
String: field contains substring.
MalformedBound
A numeric bound (gte: / lte:) whose value is not a number.
Carried rather than dropped, and ALWAYS fails: the previous
as_f64().unwrap_or(0.0) silently turned lte: "5" — or any
unresolved placeholder — into <= 0, which then failed against
perfectly good data with a message quoting a threshold the author
never wrote. A bound nobody can evaluate must say so, not pick zero.
MinRows(u64)
Body-level: result must contain at least N rows
(element_count() >= N). Use to make a SELECT
failsafe — empty result sets surface as a hard error
instead of silently passing per-row assertions vacuously.
Field name is ignored for this predicate.
Trait Implementations§
Source§impl Clone for AssertionPredicate
impl Clone for AssertionPredicate
Auto Trait Implementations§
impl Freeze for AssertionPredicate
impl RefUnwindSafe for AssertionPredicate
impl Send for AssertionPredicate
impl Sync for AssertionPredicate
impl Unpin for AssertionPredicate
impl UnsafeUnpin for AssertionPredicate
impl UnwindSafe for AssertionPredicate
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more