mirror of
https://github.com/tursodatabase/limbo.git
synced 2025-08-04 18:18:03 +00:00
core: Open WAL file and parse header
This commit is contained in:
parent
ed4116e7c2
commit
a290b2f102
3 changed files with 34 additions and 6 deletions
|
@ -48,7 +48,8 @@ impl Database {
|
|||
pub fn open_file(io: Arc<dyn crate::io::IO>, path: &str) -> Result<Database> {
|
||||
let file = io.open_file(path)?;
|
||||
let page_io = Rc::new(FileStorage::new(file));
|
||||
let wal = Rc::new(WalFile::new());
|
||||
let wal_path = format!("{}-wal", path);
|
||||
let wal = Rc::new(WalFile::new(io.clone(), wal_path));
|
||||
Self::open(io, page_io, wal)
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue