mirror of
https://github.com/tauri-apps/plugins-workspace.git
synced 2026-04-27 11:56:05 +02:00
fix(sql): more explicit error if no driver is enabled (#2047)
This commit is contained in:
@@ -104,6 +104,11 @@ impl DbPool {
|
||||
}
|
||||
Ok(Self::Postgres(Pool::connect(conn_url).await?))
|
||||
}
|
||||
#[cfg(not(any(feature = "sqlite", feature = "postgres", feature = "mysql")))]
|
||||
_ => Err(crate::Error::InvalidDbUrl(format!(
|
||||
"{conn_url} - No database driver enabled!"
|
||||
))),
|
||||
#[cfg(any(feature = "sqlite", feature = "postgres", feature = "mysql"))]
|
||||
_ => Err(crate::Error::InvalidDbUrl(conn_url.to_string())),
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user