Trait lexa_database::SGBD

source ·
pub trait SGBD {
    type Pool;

    // Required methods
    fn new<'async_trait>(
        connection_url: impl 'async_trait + AsRef<str> + ToString + Send + Sync
    ) -> Pin<Box<dyn Future<Output = Result<Self, Error>> + Send + 'async_trait>>
       where Self: Sized + 'async_trait;
    fn create_pool<'async_trait>(
        url: impl 'async_trait + AsRef<str> + Send + Sync
    ) -> Pin<Box<dyn Future<Output = Result<Self::Pool, Error>> + Send + 'async_trait>>
       where Self: 'async_trait;
}

Required Associated Types§

Required Methods§

source

fn new<'async_trait>( connection_url: impl 'async_trait + AsRef<str> + ToString + Send + Sync ) -> Pin<Box<dyn Future<Output = Result<Self, Error>> + Send + 'async_trait>>where Self: Sized + 'async_trait,

Ouvre une connexion immédiate à la base de données.

source

fn create_pool<'async_trait>( url: impl 'async_trait + AsRef<str> + Send + Sync ) -> Pin<Box<dyn Future<Output = Result<Self::Pool, Error>> + Send + 'async_trait>>where Self: 'async_trait,

Ouvre une pool de connexion à partir d’une URL.

Implementors§