diff options
Diffstat (limited to 'src/utils')
| -rw-r--r-- | src/utils/db.rs | 20 | ||||
| -rw-r--r-- | src/utils/mod.rs | 1 |
2 files changed, 0 insertions, 21 deletions
diff --git a/src/utils/db.rs b/src/utils/db.rs deleted file mode 100644 index b74f88b..0000000 --- a/src/utils/db.rs +++ /dev/null @@ -1,20 +0,0 @@ -// Copyleft (ɔ) 2021-2021 The Whirlsplash Collective -// SPDX-License-Identifier: GPL-3.0-only - -use std::error::Error; - -use sqlx::{sqlite::SqlitePoolOptions, SqlitePool}; - -pub async fn get_pool() -> Result<SqlitePool, Box<dyn Error>> { - let pool = SqlitePoolOptions::new() - .max_connections(20) - .connect(&std::env::var("DATABASE_URL")?) - .await?; - - debug!( - "connected to database at url '{}'", - &std::env::var("DATABASE_URL")? - ); - - Ok(pool) -} diff --git a/src/utils/mod.rs b/src/utils/mod.rs index c188ccd..69c91d1 100644 --- a/src/utils/mod.rs +++ b/src/utils/mod.rs @@ -1,5 +1,4 @@ // Copyleft (ɔ) 2021-2021 The Whirlsplash Collective // SPDX-License-Identifier: GPL-3.0-only -// pub mod db; pub mod system; |