Struct DatasetConfig
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() -> DatasetConfig
pub fn add_table( self, config: TableConfig, ) -> Result<DatasetConfig, 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) -> DatasetConfig
pub fn sort_indexes_by_type(self) -> DatasetConfig
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 (const: unstable) · 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<DatasetConfig, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<DatasetConfig, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for DatasetConfig
impl Serialize for DatasetConfig
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. 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 UnsafeUnpin for DatasetConfig
impl UnwindSafe for DatasetConfig
Blanket Implementations§
impl<T> AuthStrategyBounds for T
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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