pub enum StatementCacheMode {
Named,
Disabled,
}Expand description
Statement cache behavior.
Controls whether the driver caches prepared statements with server-side
names (s_{hash}) or uses unnamed statements for every query.
Variants§
Named
Named prepared statements, cached and reused (default).
Best performance for direct connections. Each unique SQL text is prepared once and reused across subsequent calls.
Disabled
Unnamed statements only — compatible with pgbouncer transaction mode.
Every query sends Parse+Bind+Execute with the unnamed statement ("").
Slightly slower (extra Parse per query) but works with connection
poolers that use transaction-level pooling (pgbouncer, PgCat).
Trait Implementations§
Source§impl Clone for StatementCacheMode
impl Clone for StatementCacheMode
Source§fn clone(&self) -> StatementCacheMode
fn clone(&self) -> StatementCacheMode
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for StatementCacheMode
impl Debug for StatementCacheMode
Source§impl Default for StatementCacheMode
impl Default for StatementCacheMode
Source§fn default() -> StatementCacheMode
fn default() -> StatementCacheMode
Returns the “default value” for a type. Read more
Source§impl PartialEq for StatementCacheMode
impl PartialEq for StatementCacheMode
impl Copy for StatementCacheMode
impl Eq for StatementCacheMode
impl StructuralPartialEq for StatementCacheMode
Auto Trait Implementations§
impl Freeze for StatementCacheMode
impl RefUnwindSafe for StatementCacheMode
impl Send for StatementCacheMode
impl Sync for StatementCacheMode
impl Unpin for StatementCacheMode
impl UnsafeUnpin for StatementCacheMode
impl UnwindSafe for StatementCacheMode
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more