blob: f010bf8cf65bbe7aab0148f0b3469de6d1931228 (
plain) (
tree)
|
|
mod users;
use sqlx::{Pool, Postgres};
use self::users::Users;
#[derive(Clone)]
pub struct Database(Pool<Postgres>);
impl Database {
pub fn new(pool: Pool<Postgres>) -> Self {
Self(pool)
}
pub fn users(&self) -> Users {
Users::new(self.0.clone())
}
}
|