pub struct DatasetConfig {
pub tables: UniqueList<TableConfig>,
}Expand description
Struct to manage the config for a given database. At connection time, the Driver will retrieve config from Vitur for the currently connected database
Fields§
§tables: UniqueList<TableConfig>Implementations§
Source§impl DatasetConfig
impl DatasetConfig
pub fn init() -> Self
pub fn add_table(self, config: TableConfig) -> Result<Self, ConfigError>
Sourcepub fn has_table<Q>(&self, query: &Q) -> boolwhere
TableConfig: PartialEq<Q>,
pub fn has_table<Q>(&self, query: &Q) -> boolwhere
TableConfig: PartialEq<Q>,
Returns true if a table matches the given query
Sourcepub fn get_table<Q>(&self, query: &Q) -> Option<&TableConfig>where
TableConfig: PartialEq<Q>,
pub fn get_table<Q>(&self, query: &Q) -> Option<&TableConfig>where
TableConfig: PartialEq<Q>,
Finds a table that matches query
Sourcepub fn sort_indexes_by_type(self) -> Self
pub fn sort_indexes_by_type(self) -> Self
Sorts all indexes by type for each field in each table. Indexes are sorted in place.
This is useful for ensuring that iteration over indexes always occurs in order
by type (instead of the order that they appear in a config file or the order of
ColumnConfig::add_index calls).
Trait Implementations§
Source§impl Clone for DatasetConfig
impl Clone for DatasetConfig
Source§fn clone(&self) -> DatasetConfig
fn clone(&self) -> DatasetConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for DatasetConfig
impl Debug for DatasetConfig
Source§impl<'de> Deserialize<'de> for DatasetConfig
impl<'de> Deserialize<'de> for DatasetConfig
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
Auto Trait Implementations§
impl Freeze for DatasetConfig
impl RefUnwindSafe for DatasetConfig
impl Send for DatasetConfig
impl Sync for DatasetConfig
impl Unpin for DatasetConfig
impl UnwindSafe for DatasetConfig
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