Skip to content

Commit

Permalink
Add the default
Browse files Browse the repository at this point in the history
  • Loading branch information
mara-schulke committed Feb 13, 2024
1 parent e971bc8 commit 467b765
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 16 deletions.
1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ async-trait.workspace = true
sqlx.workspace = true

[features]
default = []
mysql = ["atmosphere-core/mysql"]
postgres = ["atmosphere-core/postgres"]
sqlite = ["atmosphere-core/sqlite"]
Expand Down
17 changes: 1 addition & 16 deletions atmosphere-core/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -72,14 +72,6 @@ pub mod driver {
))]
compile_error!("only one database driver can be set – please use multiple binaries using different atmosphere features if you need more than one database");

#[cfg(all(
not(feature = "mysql"),
not(feature = "postgres"),
not(feature = "sqlite")
))]
/// Atmosphere Database Driver
pub type Driver = sqlx::Any;

#[cfg(all(feature = "postgres", not(any(feature = "mysql", feature = "sqlite"))))]
/// Atmosphere Database Driver
pub type Driver = sqlx::Postgres;
Expand All @@ -104,11 +96,7 @@ pub mod driver {
/// Atmosphere Database Pool
pub type Pool = sqlx::SqlitePool;

#[cfg(all(
not(feature = "postgres"),
not(feature = "mysql"),
not(feature = "sqlite")
))]
#[cfg(not(any(feature = "postgres", feature = "mysql", feature = "sqlite")))]
compile_error!(
"you must chose a atmosphere database driver (available: postgres, mysql, sqlite)"
);
Expand All @@ -120,6 +108,3 @@ pub use bind::*;
pub use error::*;
#[cfg(any(feature = "mysql", feature = "postgres", feature = "sqlite"))]
pub use schema::*;

#[doc(hidden)]
pub use sqlx;

0 comments on commit 467b765

Please sign in to comment.