diff --git a/Cargo.toml b/Cargo.toml index b32a1a85cf18..ac488b813029 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -61,7 +61,6 @@ napi-derive = "2.12.4" [workspace.dependencies.quaint] path = "quaint" features = [ - "expose-drivers", "fmt-sql", "mssql", "mysql", diff --git a/quaint/Cargo.toml b/quaint/Cargo.toml index 52a7edf72aca..cbc2e195a40d 100644 --- a/quaint/Cargo.toml +++ b/quaint/Cargo.toml @@ -25,9 +25,6 @@ features = ["docs", "all"] [features] default = ["mysql", "postgresql", "mssql", "sqlite"] docs = [] -# Expose the underlying database drivers when a connector is enabled. This is a -# way to access database-specific methods when you need extra control. -expose-drivers = [] native = [ "postgresql-native", diff --git a/quaint/src/connector/mssql/native/mod.rs b/quaint/src/connector/mssql/native/mod.rs index d22aa7a15dd6..e3276e0db7dd 100644 --- a/quaint/src/connector/mssql/native/mod.rs +++ b/quaint/src/connector/mssql/native/mod.rs @@ -24,10 +24,6 @@ use tiberius::*; use tokio::net::TcpStream; use tokio_util::compat::{Compat, TokioAsyncWriteCompatExt}; -/// The underlying SQL Server driver. Only available with the `expose-drivers` Cargo feature. -#[cfg(feature = "expose-drivers")] -pub use tiberius; - static SQL_SERVER_DEFAULT_ISOLATION: IsolationLevel = IsolationLevel::ReadCommitted; #[async_trait] @@ -100,13 +96,6 @@ impl Mssql { Ok(this) } - /// The underlying Tiberius client. Only available with the `expose-drivers` Cargo feature. - /// This is a lower level API when you need to get into database specific features. - #[cfg(feature = "expose-drivers")] - pub fn client(&self) -> &Mutex>> { - &self.client - } - async fn perform_io(&self, fut: F) -> crate::Result where F: Future>, diff --git a/quaint/src/connector/mysql/native/mod.rs b/quaint/src/connector/mysql/native/mod.rs index fdcc3a6276d1..71df11118dd6 100644 --- a/quaint/src/connector/mysql/native/mod.rs +++ b/quaint/src/connector/mysql/native/mod.rs @@ -26,11 +26,6 @@ use std::{ }; use tokio::sync::Mutex; -/// The underlying MySQL driver. Only available with the `expose-drivers` -/// Cargo feature. -#[cfg(feature = "expose-drivers")] -pub use mysql_async; - impl MysqlUrl { pub(crate) fn cache(&self) -> LruCache { LruCache::new(self.query_params.statement_cache_size) @@ -90,14 +85,6 @@ impl Mysql { }) } - /// The underlying mysql_async::Conn. Only available with the - /// `expose-drivers` Cargo feature. This is a lower level API when you need - /// to get into database specific features. - #[cfg(feature = "expose-drivers")] - pub fn conn(&self) -> &Mutex { - &self.conn - } - async fn perform_io(&self, op: U) -> crate::Result where F: Future>, diff --git a/quaint/src/connector/postgres/native/mod.rs b/quaint/src/connector/postgres/native/mod.rs index 30f34e7002be..6e84c00236aa 100644 --- a/quaint/src/connector/postgres/native/mod.rs +++ b/quaint/src/connector/postgres/native/mod.rs @@ -29,11 +29,6 @@ use std::{ }; use tokio_postgres::{config::ChannelBinding, Client, Config, Statement}; -/// The underlying postgres driver. Only available with the `expose-drivers` -/// Cargo feature. -#[cfg(feature = "expose-drivers")] -pub use tokio_postgres; - struct PostgresClient(Client); impl Debug for PostgresClient { @@ -246,14 +241,6 @@ impl PostgreSql { }) } - /// The underlying tokio_postgres::Client. Only available with the - /// `expose-drivers` Cargo feature. This is a lower level API when you need - /// to get into database specific features. - #[cfg(feature = "expose-drivers")] - pub fn client(&self) -> &tokio_postgres::Client { - &self.client.0 - } - async fn fetch_cached(&self, sql: &str, params: &[Value<'_>]) -> crate::Result { let mut cache = self.statement_cache.lock().await; let capacity = cache.capacity(); diff --git a/quaint/src/connector/sqlite/native/mod.rs b/quaint/src/connector/sqlite/native/mod.rs index 3bf0c46a7db5..b513ad0b4faa 100644 --- a/quaint/src/connector/sqlite/native/mod.rs +++ b/quaint/src/connector/sqlite/native/mod.rs @@ -19,10 +19,6 @@ use async_trait::async_trait; use std::convert::TryFrom; use tokio::sync::Mutex; -/// The underlying sqlite driver. Only available with the `expose-drivers` Cargo feature. -#[cfg(feature = "expose-drivers")] -pub use rusqlite; - /// A connector interface for the SQLite database pub struct Sqlite { pub(crate) client: Mutex, @@ -60,13 +56,6 @@ impl Sqlite { client: Mutex::new(client), }) } - - /// The underlying rusqlite::Connection. Only available with the `expose-drivers` Cargo - /// feature. This is a lower level API when you need to get into database specific features. - #[cfg(feature = "expose-drivers")] - pub fn connection(&self) -> &Mutex { - &self.client - } } impl_default_TransactionCapable!(Sqlite);