Rename and make public DB types
This commit is contained in:
parent
39bd9dd054
commit
de5d2757a9
|
|
@ -32,19 +32,19 @@ pub mod built_info {
|
|||
|
||||
use crate::core_commands::*;
|
||||
|
||||
type Pool = diesel::r2d2::Pool<ConnectionManager<SqliteConnection>>;
|
||||
pub type ManifoldDatabasePool = diesel::r2d2::Pool<ConnectionManager<SqliteConnection>>;
|
||||
|
||||
pub struct Db {
|
||||
pool: Pool,
|
||||
pool: ManifoldDatabasePool,
|
||||
}
|
||||
|
||||
impl Deref for Db {
|
||||
type Target = Pool;
|
||||
type Target = ManifoldDatabasePool;
|
||||
|
||||
fn deref(&self) -> &Self::Target { &self.pool }
|
||||
}
|
||||
|
||||
struct ManifoldDatabase;
|
||||
pub struct ManifoldDatabase;
|
||||
|
||||
impl TypeMapKey for ManifoldDatabase {
|
||||
type Value = Arc<Mutex<Db>>;
|
||||
|
|
|
|||
Loading…
Reference in New Issue