[package] authors = ["Braden Steffaniak"] categories = ["database"] description = "MoosicBox database package" edition = "2021" keywords = ["database", "mysql", "postgres", "sqlite"] license = "MPL-2.0" name = "moosicbox_database" readme = "README.md" repository = "https://github.com/MoosicBox/MoosicBox" version = "0.1.0" [dependencies] moosicbox_task = { version = "0.1.0", path = "../task", optional = true, default-features = false } # DB Dependencies rusqlite = { workspace = true, optional = true } # sqlx dependencies sqlx = { workspace = true, optional = true, features = ["runtime-tokio"] } sqlx-postgres = { workspace = true, optional = true } # tokio-postgres dependencies postgres-protocol = { workspace = true, optional = true, features = [] } tokio-postgres = { workspace = true, optional = true, features = [] } # Postgres dependencies regex = { workspace = true, optional = true } # Api dependencies actix-web = { workspace = true, optional = true } qstring = { workspace = true, optional = true } async-trait = { workspace = true } chrono = { workspace = true } futures = { workspace = true, optional = true } log = { workspace = true } thiserror = { workspace = true } tokio = { workspace = true, features = ["sync"] } tokio-util = { workspace = true, optional = true } [features] default = ["api", "mysql", "postgres-sqlx", "sqlite-rusqlite", "sqlite-sqlx"] fail-on-warnings = [] tls = ["sqlx/tls-rustls"] api = ["dep:actix-web", "dep:futures", "dep:qstring"] mysql = ["mysql-sqlx", "sqlx"] mysql-sqlx = ["dep:futures", "dep:sqlx", "sqlx", "sqlx/mysql"] postgres = [ "dep:futures", "dep:moosicbox_task", "dep:regex", "dep:tokio-util", "postgres-raw", ] postgres-raw = ["dep:postgres-protocol", "dep:tokio-postgres", "postgres"] postgres-sqlx = [ "dep:sqlx", "dep:sqlx-postgres", "postgres", "sqlx", "sqlx-postgres/chrono", "sqlx/postgres", ] sqlite = ["sqlite-sqlx"] sqlite-rusqlite = ["dep:rusqlite"] sqlite-sqlx = ["dep:futures", "dep:regex", "dep:sqlx", "sqlx", "sqlx/sqlite"] sqlx = []