Skip to content

Commit 291125a

Browse files
removed mysql in favor of sqlx
1 parent 3265b4f commit 291125a

File tree

5 files changed

+3
-1377
lines changed

5 files changed

+3
-1377
lines changed

Cargo.toml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,10 @@ csvparser = ["csv"]
2222
htmldom = ["kuchiki", "html5ever"]
2323

2424
io = ["gpio", "fs"]
25-
db = ["mysql", "sqlx"]
25+
db = ["sqlx"]
2626

2727
fs = []
2828
gpio = ["gpio-cdev"]
29-
mysql = ["mysql_lib"]
3029
sqlx = ["sqlx_lib"]
3130

3231
com = ["http"]
@@ -68,7 +67,6 @@ gpp = "0.6"
6867
reqwest = { version = "0.11", features = ["rustls-tls", "cookies", "gzip", "deflate", "multipart", "blocking"], optional = true, default-features = false }
6968
gpio-cdev = { git = "https://github.com/rust-embedded/gpio-cdev", optional = true, features = ["async-tokio", "futures"] }
7069
futures = { version = "0.3" }
71-
mysql_lib = { package = "mysql_async", version = "0.34.1", optional = true }
7270
sqlx_lib = { package = "sqlx", version = "0.8.2", features = ["mysql", "postgres", "runtime-tokio", "time", "chrono", "uuid", "rust_decimal"], optional = true }
7371
lru = { version = "0.12.1", optional = true }
7472
csv = { version = "1.1.6", optional = true }

src/modules/db/mod.rs

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,10 @@
11
use quickjs_runtime::builder::QuickJsRuntimeBuilder;
22

3-
#[cfg(any(feature = "all", feature = "db", feature = "mysql"))]
4-
pub mod mysql;
5-
6-
#[cfg(any(feature = "all", feature = "db", feature = "sqlx"))]
3+
#[cfg(feature = "sqlx")]
74
pub mod sqlx;
85

96
pub(crate) fn init(builder: QuickJsRuntimeBuilder) -> QuickJsRuntimeBuilder {
10-
#[cfg(any(feature = "all", feature = "db", feature = "mysql"))]
11-
let builder = mysql::init(builder);
12-
#[cfg(any(feature = "all", feature = "db", feature = "sqlx"))]
7+
#[cfg(feature = "sqlx")]
138
let builder = sqlx::init(builder);
149
builder
1510
}

0 commit comments

Comments
 (0)