Skip to main content

apply_connection_pragmas

Function apply_connection_pragmas 

Source
pub fn apply_connection_pragmas(conn: &Connection) -> Result<(), AppError>
Expand description

Applies per-connection PRAGMAs: synchronous, foreign keys, busy timeout, cache, mmap, WAL.

Safe to call on every new connection; all settings are idempotent.

ยงErrors

Returns Err when any PRAGMA execution fails.