Skip to main content

open_file

Function open_file 

Source
pub fn open_file(
    path: impl AsRef<Path>,
) -> Result<Reader<WalSource<FileSource, FileSource>>>
Expand description

Open a database file by path, log included if there is one.

This is the call that does the right thing without the caller having to know what wal mode is: if a -wal file sits next to the database and holds committed frames, its pages are read on top of the main file, and if it does not, nothing changes.