pub struct MultiDatabaseManager { /* private fields */ }Implementations§
Source§impl MultiDatabaseManager
impl MultiDatabaseManager
pub fn new(config: MultiDatabaseConfig) -> Self
pub async fn register_database( &self, name: &str, config: DatabaseInstanceConfig, ) -> Result<()>
pub async fn connect(&self, name: &str) -> Result<Box<dyn DatabaseConnection>>
pub async fn disconnect(&self, name: &str) -> Result<()>
pub async fn get_connection( &self, name: &str, ) -> Result<Box<dyn DatabaseConnection>>
pub fn get_database_info(&self, name: &str) -> Option<DatabaseInfo>
pub fn list_databases(&self) -> Vec<DatabaseInfo>
pub async fn health_check(&self, name: &str) -> Result<HealthStatus>
pub async fn health_check_all(&self) -> HashMap<String, HealthStatus>
pub async fn reconnect(&self, name: &str) -> Result<()>
pub async fn execute_on_all<F, Fut>( &self, sql: &str, _params: &[Value], _f: F, ) -> Result<HashMap<String, Vec<Value>>>
pub async fn backup_database( &self, name: &str, backup_path: &str, ) -> Result<BackupInfo>
Auto Trait Implementations§
impl !Freeze for MultiDatabaseManager
impl RefUnwindSafe for MultiDatabaseManager
impl Send for MultiDatabaseManager
impl Sync for MultiDatabaseManager
impl Unpin for MultiDatabaseManager
impl UnsafeUnpin for MultiDatabaseManager
impl UnwindSafe for MultiDatabaseManager
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> 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