pub struct AssertionChecker;Expand description
Assertion checker for runtime constraint enforcement (SQL:1999 Feature F671/F672)
This struct provides methods to check all database assertions after DML operations. Assertions are schema-level constraints that can span multiple tables.
Implementations§
Source§impl AssertionChecker
impl AssertionChecker
Sourcepub fn check_all_assertions(db: &Database) -> Result<(), ExecutorError>
pub fn check_all_assertions(db: &Database) -> Result<(), ExecutorError>
Check all assertions in the database
This should be called after INSERT, UPDATE, or DELETE operations to ensure that no assertion constraints are violated.
§Arguments
db- Database reference (immutable, we only read data)
§Returns
Ok(())if all assertions passErr(ExecutorError::AssertionViolation)if any assertion is violated
Auto Trait Implementations§
impl Freeze for AssertionChecker
impl RefUnwindSafe for AssertionChecker
impl Send for AssertionChecker
impl Sync for AssertionChecker
impl Unpin for AssertionChecker
impl UnwindSafe for AssertionChecker
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
Mutably borrows from an owned value. Read more
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>
Converts
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>
Converts
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