[−][src]Trait sqlx::Connection
Represents a single database connection rather than a pool of database connections.
Prefer running queries from Pool unless there is a specific need for a single, continuous connection.
Required methods
fn open<T>(
url: T
) -> Pin<Box<dyn Future<Output = Result<Self, Error>> + 'static + Send>> where
T: TryInto<Url, Error = Error>,
url: T
) -> Pin<Box<dyn Future<Output = Result<Self, Error>> + 'static + Send>> where
T: TryInto<Url, Error = Error>,
Establish a new database connection.
fn close(
self
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + 'static + Send>>
self
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + 'static + Send>>
Close this database connection.
Provided methods
fn ping(&mut self) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send>>
Verifies a connection to the database is still alive.
Implementors
impl Connection for MySqlConnection
[src]
fn open<T>(
url: T
) -> Pin<Box<dyn Future<Output = Result<MySqlConnection, Error>> + 'static + Send>> where
T: TryInto<Url, Error = Error>,
MySqlConnection: Sized,
[src]
url: T
) -> Pin<Box<dyn Future<Output = Result<MySqlConnection, Error>> + 'static + Send>> where
T: TryInto<Url, Error = Error>,
MySqlConnection: Sized,
fn close(
self
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + 'static + Send>>
[src]
self
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + 'static + Send>>