Skip to main content

AsyncMysqlConnection

Type Alias AsyncMysqlConnection 

Source
pub type AsyncMysqlConnection = AsyncMysqlLikeConnection<Mysql>;
Expand description

A connection to a MySQL database. Connection URLs should be in the form mysql://[user[:password]@]host/database_name

§Cancellation and timeouts

Dropping a query future before it completes, for example when a timeout expires, can leave this connection with an unfinished operation. Such a connection must not be reused: drop it and establish a new connection instead. Cancelling the future does not guarantee that the server stopped executing the query or rolled back its effects.

The connection pool integrations detect this state and discard the broken connection when it is returned to the pool. Users managing connections without a pool must handle this themselves whenever they cancel or time out an operation.

Aliased Type§

pub struct AsyncMysqlConnection { /* private fields */ }