Open prabirshrestha opened 7 months ago
I have the same issue, found out that the compilation of any_kind()
is gated behind some features in sqlx_core (sqlx-core/src/pool/mod.rs
):
#[cfg(all(
any(
feature = "postgres",
feature = "mysql",
feature = "mssql",
feature = "sqlite"
),
feature = "any"
))]
impl Pool<Any> {
/// Returns the database driver currently in-use by this `Pool`.
///
/// Determined by the connection URL.
pub fn any_kind(&self) -> AnyKind {
self.0
.connect_options
.read()
.expect("write-lock holder panicked")
.kind()
}
}
Turns out that the features postgres
, mysql
, mssql
and sqlite
have been removed during refactoring (#2039), as well as the kind()
method on AnyConnectOptions
.
Adding these features back in the sqlx_core crate and implementing the missing kind()
method on AnyConnectOptions
brings back any_kind()
, though I don't know if it's the intended way to do it here (perhaps we could remove these feature flags alltogether?)
Bug Description
any_kind()
is not available inPool<Any>
in v0.7.Minimal Reproduction
A small code snippet or a link to a Github repo or Gist, with instructions on reproducing the bug.
Error:
Info
rustc --version
: rustc 1.77.0 (aedd173a2 2024-03-17)