#[cfg(feature = "postgres")]
pub(in crate::state::merkle::sql) mod postgres;
#[cfg(feature = "sqlite")]
mod sqlite;
use crate::error::InternalError;
#[cfg(feature = "state-merkle-sql-postgres-tests")]
pub use postgres::test::run_postgres_test;
#[cfg(feature = "postgres")]
pub use postgres::{PostgresBackend, PostgresBackendBuilder, PostgresConnection};
#[cfg(feature = "sqlite")]
pub use sqlite::{JournalMode, SqliteBackend, SqliteBackendBuilder, SqliteConnection, Synchronous};
pub trait Connection {
type ConnectionType: diesel::Connection;
fn as_inner(&self) -> &Self::ConnectionType;
}
pub trait Backend: Sync + Send {
type Connection: Connection;
fn connection(&self) -> Result<Self::Connection, InternalError>;
}