Skip to main content

ConstraintChecker

Struct ConstraintChecker 

Source
pub struct ConstraintChecker;
Expand description

Constraint checker for validating database constraints.

Implementations§

Source§

impl ConstraintChecker

Source

pub fn check_not_null(schema: &Table, row: &Row) -> Result<()>

Checks the not-null constraint for a row.

Source

pub fn check_not_null_rows(schema: &Table, rows: &[Row]) -> Result<()>

Checks the not-null constraint for multiple rows.

Source

pub fn check_foreign_keys_for_insert( cache: &TableCache, schema: &Table, rows: &[Row], timing: ConstraintTiming, ) -> Result<()>

Checks foreign key constraints for insert.

Source

pub fn check_foreign_keys_for_delete( cache: &TableCache, schema: &Table, rows: &[Row], timing: ConstraintTiming, ) -> Result<()>

Checks foreign key constraints for delete.

Source

pub fn check_foreign_keys_for_update( cache: &TableCache, schema: &Table, modifications: &[(Row, Row)], timing: ConstraintTiming, ) -> Result<()>

Checks foreign key constraints for update.

Source

pub fn find_existing_row_id_in_pk_index( store: &RowStore, row: &Row, ) -> Option<RowId>

Finds existing row ID by primary key in the store.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.