Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions sqlx-core/src/pool/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -531,12 +531,14 @@ impl<DB: Database> Pool<DB> {
self.0.close_event()
}

/// Returns the number of connections currently active. This includes idle connections.
/// Returns the total number of connections owned by the pool.
///
/// This includes idle connections and ones still being opened.
pub fn size(&self) -> u32 {
self.0.size()
}

/// Returns the number of connections active and idle (not in use).
/// Returns the number of idle connections (not checked out).
pub fn num_idle(&self) -> usize {
self.0.num_idle()
}
Expand Down
Loading