Skip to content

Commit

Permalink
refactor: comment out unimplemented features
Browse files Browse the repository at this point in the history
Signed-off-by: Naian <[email protected]>
  • Loading branch information
nain-F49FF806 committed Oct 19, 2023
1 parent b11bd27 commit 05cea28
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 19 deletions.
1 change: 0 additions & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions agents/rust/mediator/mediation/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ path = "src/lib.rs"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[features]
default = ["mysql_db", "mediator_persistence_extras"]
postgres_db=["sqlx/postgres"]
# postgres_db=["sqlx/postgres"]
mysql_db=["sqlx/mysql"]
any_db=["sqlx/all-databases"]
# any_db=["sqlx/all-databases"]
mediator_persistence_extras = []

[dependencies]
Expand Down
33 changes: 17 additions & 16 deletions agents/rust/mediator/mediation/src/storage/database/mod.rs
Original file line number Diff line number Diff line change
@@ -1,24 +1,25 @@
// Copyright 2023 Naian G.
// SPDX-License-Identifier: Apache-2.0

#[cfg(any(
not(any(feature = "any_db", feature = "postgres_db", feature = "mysql_db")),
all(feature = "any_db", feature = "postgres_db", feature = "mysql_db"),
all(feature = "any_db", feature = "postgres_db"),
all(feature = "postgres_db", feature = "mysql_db"),
all(feature = "any_db", feature = "mysql_db")
))]
compile_error!("Pick any one of \"any_db\", \"postgresql_db\", \"mysql_db\" feature flags.");
// unimplemented!()
// #[cfg(any(
// not(any(feature = "any_db", feature = "postgres_db", feature = "mysql_db")),
// all(feature = "any_db", feature = "postgres_db", feature = "mysql_db"),
// all(feature = "any_db", feature = "postgres_db"),
// all(feature = "postgres_db", feature = "mysql_db"),
// all(feature = "any_db", feature = "mysql_db")
// ))]
// compile_error!("Pick any one of \"any_db\", \"postgresql_db\", \"mysql_db\" feature flags.");

#[cfg(feature = "any_db")]
mod any;
#[cfg(feature = "any_db")]
pub use any::get_db_pool;
// #[cfg(feature = "any_db")]
// mod any;
// #[cfg(feature = "any_db")]
// pub use any::get_db_pool;

#[cfg(feature = "postgres_db")]
mod postgres;
#[cfg(feature = "postgres_db")]
pub use postgres::get_db_pool;
// #[cfg(feature = "postgres_db")]
// mod postgres;
// #[cfg(feature = "postgres_db")]
// pub use postgres::get_db_pool;

#[cfg(feature = "mysql_db")]
mod mysql;
Expand Down

0 comments on commit 05cea28

Please sign in to comment.