pub struct ConstraintChecker;Expand description
Constraint checker for validating database constraints.
Implementations§
Source§impl ConstraintChecker
impl ConstraintChecker
Sourcepub fn check_not_null(schema: &Table, row: &Row) -> Result<()>
pub fn check_not_null(schema: &Table, row: &Row) -> Result<()>
Checks the not-null constraint for a row.
Sourcepub fn check_not_null_rows(schema: &Table, rows: &[Row]) -> Result<()>
pub fn check_not_null_rows(schema: &Table, rows: &[Row]) -> Result<()>
Checks the not-null constraint for multiple rows.
Sourcepub fn check_foreign_keys_for_insert(
cache: &TableCache,
schema: &Table,
rows: &[Row],
timing: ConstraintTiming,
) -> Result<()>
pub fn check_foreign_keys_for_insert( cache: &TableCache, schema: &Table, rows: &[Row], timing: ConstraintTiming, ) -> Result<()>
Checks foreign key constraints for insert.
Sourcepub fn check_foreign_keys_for_delete(
cache: &TableCache,
schema: &Table,
rows: &[Row],
timing: ConstraintTiming,
) -> Result<()>
pub fn check_foreign_keys_for_delete( cache: &TableCache, schema: &Table, rows: &[Row], timing: ConstraintTiming, ) -> Result<()>
Checks foreign key constraints for delete.
Sourcepub fn check_foreign_keys_for_update(
cache: &TableCache,
schema: &Table,
modifications: &[(Row, Row)],
timing: ConstraintTiming,
) -> Result<()>
pub fn check_foreign_keys_for_update( cache: &TableCache, schema: &Table, modifications: &[(Row, Row)], timing: ConstraintTiming, ) -> Result<()>
Checks foreign key constraints for update.
Auto Trait Implementations§
impl Freeze for ConstraintChecker
impl RefUnwindSafe for ConstraintChecker
impl Send for ConstraintChecker
impl Sync for ConstraintChecker
impl Unpin for ConstraintChecker
impl UnwindSafe for ConstraintChecker
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