mirror of
https://github.com/Cuprate/cuprate.git
synced 2025-02-04 20:26:33 +00:00
a438279aa8
* storage: port some code `cuprate-blockchain` -> `database` * database: remove `Tables` references * database: remove old `cuprate-blockchain` type references * find/replace `cuprate_blockchain` -> `database`, add `create_db()` * database: fix redb * database: use readme for docs, link in `lib.rs` * database: fix `open_db_ro`, `open_db_rw`, `create_db` behavior * database: add open table tests * database: fix tests, remove blockchain specific references * database: remove `ReaderThreads`, make `db_directory` mandatory * initial `cuprate-blockchain` split * fix doc links * rename, fix database config * blockchain: create `crate::open()`, `OpenTables::create_tables()` * more compat fixes * fix imports * fix conflicts * align cargo.toml * docs * fixes * add `unused_crate_dependencies` lint, fix * blockchain: add open table tests
16 lines
364 B
Rust
16 lines
364 B
Rust
//! Database backends.
|
|
|
|
cfg_if::cfg_if! {
|
|
// If both backends are enabled, fallback to `heed`.
|
|
// This is useful when using `--all-features`.
|
|
if #[cfg(all(feature = "redb", not(feature = "heed")))] {
|
|
mod redb;
|
|
pub use redb::ConcreteEnv;
|
|
} else {
|
|
mod heed;
|
|
pub use heed::ConcreteEnv;
|
|
}
|
|
}
|
|
|
|
#[cfg(test)]
|
|
mod tests;
|