Struct db_sqlx_postgres::Database [−][src]
pub struct Database {
pub pool: PgPool,
}
Expand description
Database pool. All database functionallity(libadmin
traits) are implemented on this
data structure
Fields
pool: PgPool
database pool
Trait Implementations
login with email as user-identifier
login with username as user-identifier
fn email_register<'life0, 'life1, 'async_trait>(
&'life0 self,
payload: &'life1 EmailRegisterPayload<'_>
) -> Pin<Box<dyn Future<Output = DBResult<()>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn email_register<'life0, 'life1, 'async_trait>(
&'life0 self,
payload: &'life1 EmailRegisterPayload<'_>
) -> Pin<Box<dyn Future<Output = DBResult<()>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
username and email is available during registration
fn username_register<'life0, 'life1, 'async_trait>(
&'life0 self,
payload: &'life1 UsernameRegisterPayload<'_>
) -> Pin<Box<dyn Future<Output = DBResult<()>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn username_register<'life0, 'life1, 'async_trait>(
&'life0 self,
payload: &'life1 UsernameRegisterPayload<'_>
) -> Pin<Box<dyn Future<Output = DBResult<()>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
register with username
fn update_email<'life0, 'life1, 'async_trait>(
&'life0 self,
payload: &'life1 UpdateEmailPayload<'_>
) -> Pin<Box<dyn Future<Output = DBResult<()>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn update_email<'life0, 'life1, 'async_trait>(
&'life0 self,
payload: &'life1 UpdateEmailPayload<'_>
) -> Pin<Box<dyn Future<Output = DBResult<()>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
Update email of specified user in database
Update password of specified user in database
check if an email exists in the database
delete account from database
check if a username exists in the database
fn update_username<'life0, 'life1, 'async_trait>(
&'life0 self,
payload: &'life1 UpdateUsernamePayload<'_>
) -> Pin<Box<dyn Future<Output = DBResult<()>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn update_username<'life0, 'life1, 'async_trait>(
&'life0 self,
payload: &'life1 UpdateUsernamePayload<'_>
) -> Pin<Box<dyn Future<Output = DBResult<()>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
update username in database
update secret in database