feat: add Connection::shrink_buffers, PoolConnection::close

closes #2372
This commit is contained in:
Austin Bonander
2023-03-03 16:09:13 -08:00
committed by Austin Bonander
parent 728280a2a3
commit c4b835c23a
13 changed files with 187 additions and 21 deletions

View File

@@ -57,6 +57,10 @@ impl AnyConnectionBackend for PgConnection {
PgTransactionManager::start_rollback(self)
}
fn shrink_buffers(&mut self) {
Connection::shrink_buffers(self);
}
fn flush(&mut self) -> BoxFuture<'_, sqlx_core::Result<()>> {
Connection::flush(self)
}

View File

@@ -199,6 +199,10 @@ impl Connection for PgConnection {
})
}
fn shrink_buffers(&mut self) {
self.stream.shrink_buffers();
}
#[doc(hidden)]
fn flush(&mut self) -> BoxFuture<'_, Result<(), Error>> {
self.wait_until_ready().boxed()