diff --git a/sqlx-core/src/common/statement_cache.rs b/sqlx-core/src/common/statement_cache.rs index f0f108cf..6ce4fbde 100644 --- a/sqlx-core/src/common/statement_cache.rs +++ b/sqlx-core/src/common/statement_cache.rs @@ -58,4 +58,9 @@ impl StatementCache { pub fn contains_key(&mut self, k: &str) -> bool { self.inner.contains_key(k) } + + /// Returns the maximum number of statements the cache can hold. + pub fn capacity(&self) -> usize { + self.inner.capacity() + } }