Refined locking_mode() and journal_mode() methods