mirror of
https://github.com/launchbadge/sqlx.git
synced 2026-02-07 00:17:35 +00:00
Pool::new(): forward to connection types for string syntax
This commit is contained in:
parent
c92ee619c3
commit
6682d4dce7
@ -43,6 +43,12 @@ where
|
||||
DB::Connection: crate::Connection<Database = DB>,
|
||||
{
|
||||
/// Creates a connection pool with the default configuration.
|
||||
///
|
||||
/// The connection URL syntax is documented on the connection type for the respective
|
||||
/// database you're connecting to:
|
||||
///
|
||||
/// * MySQL/MariaDB: [crate::MySqlConnection]
|
||||
/// * PostgreSQL: [crate::PgConnection]
|
||||
pub async fn new(url: &str) -> crate::Result<Self> {
|
||||
Self::builder().build(url).await
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user