pub struct Database { /* private fields */ }
Implementations§
Source§impl Database
impl Database
Sourcepub fn set_constraint(&mut self, constraint: Constraint) -> &mut Database
pub fn set_constraint(&mut self, constraint: Constraint) -> &mut Database
Add a constraint to the database
Sourcepub fn constraint(&self, key: &str) -> Option<Arc<Constraint>>
pub fn constraint(&self, key: &str) -> Option<Arc<Constraint>>
Find a constraint by name
Sourcepub fn constraints(&self) -> Iter<'_, Arc<String>, Arc<Constraint>>
pub fn constraints(&self) -> Iter<'_, Arc<String>, Arc<Constraint>>
Get constraints iterator
Sourcepub fn constraints_by_table(
&self,
table: Arc<Table>,
side: Option<ConstraintSide>,
) -> Vec<Arc<Constraint>>
pub fn constraints_by_table( &self, table: Arc<Table>, side: Option<ConstraintSide>, ) -> Vec<Arc<Constraint>>
Search for constraints by local or foreign table name
Sourcepub fn constraints_by_column(
&self,
column: Arc<Column>,
side: Option<ConstraintSide>,
) -> Vec<Arc<Constraint>>
pub fn constraints_by_column( &self, column: Arc<Column>, side: Option<ConstraintSide>, ) -> Vec<Arc<Constraint>>
Search for constraints by local or foreign column
Sourcepub fn constraints_by_column_name(
&self,
column_name: Arc<String>,
side: Option<ConstraintSide>,
) -> Vec<Arc<Constraint>>
pub fn constraints_by_column_name( &self, column_name: Arc<String>, side: Option<ConstraintSide>, ) -> Vec<Arc<Constraint>>
Find constraints by column name
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Database
impl<'de> Deserialize<'de> for Database
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl WithMetadata for Database
impl WithMetadata for Database
Source§fn get_metadata_mut(&mut self) -> &mut HashMap<String, String>
fn get_metadata_mut(&mut self) -> &mut HashMap<String, String>
Borrow metadata container for writing
Source§fn set_meta(
&mut self,
meta_key: impl ToString,
meta_value: impl ToString,
) -> &mut Self
fn set_meta( &mut self, meta_key: impl ToString, meta_value: impl ToString, ) -> &mut Self
Set metadata key value pair
Source§fn set_meta_flag(&mut self, meta_flag: impl ToString) -> &mut Self
fn set_meta_flag(&mut self, meta_flag: impl ToString) -> &mut Self
Set metadata flag
Auto Trait Implementations§
impl Freeze for Database
impl RefUnwindSafe for Database
impl Send for Database
impl Sync for Database
impl Unpin for Database
impl UnwindSafe for Database
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> 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>
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