Struct sqlx::pool::PoolConnection [−][src]
pub struct PoolConnection<DB> where
DB: Database, { /* fields omitted */ }
Expand description
A connection managed by a Pool
.
Will be returned to the pool on-drop.
Implementations
👎 Deprecated: renamed to .detach()
for clarity
renamed to .detach()
for clarity
Explicitly release a connection from the pool
Detach this connection from the pool, allowing it to open a replacement.
Note that if your application uses a single shared pool, this
effectively lets the application exceed the max_connections
setting.
If you want the pool to treat this connection as permanently checked-out,
use .leak()
instead.
Detach this connection from the pool, treating it as permanently checked-out.
This effectively will reduce the maximum capacity of the pool by 1 every time it is used.
If you don’t want to impact the pool’s capacity, use .detach()
instead.
Trait Implementations
type Connection = &'c mut <Postgres as Database>::Connection
type Connection = &'c mut <Sqlite as Database>::Connection
type Connection = &'c mut <Any as Database>::Connection
type Connection = &'c mut <MySql as Database>::Connection
type Connection = &'c mut <Mssql as Database>::Connection
type Target = <DB as Database>::Connection
type Target = <DB as Database>::Connection
The resulting type after dereferencing.
Dereferences the value.
Mutably dereferences the value.
Returns the connection to the Pool
it was checked-out from.
Execute multiple queries and return the generated results as a stream from each query, in a stream. Read more
Execute the query and returns at most one row.
Prepare the SQL query, with parameter type information, to inspect the type information about its parameters and results. Read more
Execute the query and return the total number of rows affected.
Execute multiple queries and return the rows affected from each query, in a stream.
Execute the query and return the generated results as a stream.
Execute the query and return all the generated results, collected into a Vec
.
Execute the query and returns exactly one row.
Execute multiple queries and return the generated results as a stream from each query, in a stream. Read more
Execute the query and returns at most one row.
Prepare the SQL query, with parameter type information, to inspect the type information about its parameters and results. Read more
Execute the query and return the total number of rows affected.
Execute multiple queries and return the rows affected from each query, in a stream.
Execute the query and return the generated results as a stream.
Execute the query and return all the generated results, collected into a Vec
.
Execute the query and returns exactly one row.
Execute multiple queries and return the generated results as a stream from each query, in a stream. Read more
Execute the query and returns at most one row.
Prepare the SQL query, with parameter type information, to inspect the type information about its parameters and results. Read more
Execute the query and return the total number of rows affected.
Execute multiple queries and return the rows affected from each query, in a stream.
Execute the query and return the generated results as a stream.
Execute the query and return all the generated results, collected into a Vec
.
Execute the query and returns exactly one row.
Execute multiple queries and return the generated results as a stream from each query, in a stream. Read more
Execute the query and returns at most one row.
Prepare the SQL query, with parameter type information, to inspect the type information about its parameters and results. Read more
Execute the query and return the total number of rows affected.
Execute multiple queries and return the rows affected from each query, in a stream.
Execute the query and return the generated results as a stream.
Execute the query and return all the generated results, collected into a Vec
.
Execute the query and returns exactly one row.
Execute multiple queries and return the generated results as a stream from each query, in a stream. Read more
Execute the query and returns at most one row.
Prepare the SQL query, with parameter type information, to inspect the type information about its parameters and results. Read more
Execute the query and return the total number of rows affected.
Execute multiple queries and return the rows affected from each query, in a stream.
Execute the query and return the generated results as a stream.
Execute the query and return all the generated results, collected into a Vec
.
Execute the query and returns exactly one row.
the version number of the server in libpq
format