diff --git a/src/config/structs.rs b/src/config/structs.rs index da3b66c856779fb1037744e1e4607ef911f41236..7e5bc1d60cd0ec343f863e2ecd1827d0b43dbfb2 100644 --- a/src/config/structs.rs +++ b/src/config/structs.rs @@ -21,7 +21,6 @@ pub struct Database { pub kv: Option, pub mongo: Option, pub redis: Option, - pub sqlite: Option, } #[derive(Clone, Serialize, Deserialize)] @@ -29,11 +28,6 @@ pub struct KV { pub method: String, } -#[derive(Clone, Serialize, Deserialize)] -pub struct SQlite { - pub connect: String, -} - #[derive(Clone, Serialize, Deserialize)] pub struct Redis { pub server: String, diff --git a/src/main.rs b/src/main.rs index b5eb1f2106afdd3e5e4e7ca068ba4ccc31f47a9b..c41fd845abc35c3474f2c252b14dfa2f8fbf7a6e 100644 --- a/src/main.rs +++ b/src/main.rs @@ -417,9 +417,6 @@ mod kv_db { pub fn drop_db(conn: KV) { drop(conn.db.borrow()); } } -#[export_module] -mod sqlite_db {} - #[export_module] mod redis_db { #[derive(Clone)] @@ -593,9 +590,6 @@ mod redis_db { } } -#[export_module] -mod sqlx {} - #[export_module] mod http { #[derive(Clone)] @@ -770,16 +764,11 @@ async fn handler(url: Path, req: HttpRequest, config: Data) -> i engine.register_static_module("http", http.into()); engine.register_static_module("exists", exists.into()); - // add redis support, sqlx, if let Some(database) = &config.database { if let Some(_) = &database.kv { let kv = exported_module!(kv_db); engine.register_static_module("kv", kv.into()); } - if let Some(_) = &database.sqlite { - let sqlite = exported_module!(sqlite_db); - engine.register_static_module("sqlite", sqlite.into()); - } if let Some(_) = &database.mongo { let mongo = exported_module!(mongo_db); engine.register_static_module("mongo", mongo.into());