use core wal file for wasm

This commit is contained in:
Pere Diaz Bou
2024-11-14 17:54:20 +01:00
parent 4a55e0b26d
commit 87c80b2a07
4 changed files with 22 additions and 71 deletions

View File

@@ -25,8 +25,7 @@ use std::{cell::RefCell, rc::Rc};
#[cfg(feature = "fs")]
use storage::database::FileStorage;
use storage::sqlite3_ondisk::DatabaseHeader;
#[cfg(feature = "fs")]
use storage::wal::WalFile;
pub use storage::wal::WalFile;
use translate::optimizer::optimize_plan;
use translate::planner::prepare_select_plan;

View File

@@ -57,7 +57,6 @@ pub trait Wal {
fn sync(&mut self) -> Result<CheckpointStatus>;
}
#[cfg(feature = "fs")]
pub struct WalFile {
io: Arc<dyn crate::io::IO>,
wal_path: String,
@@ -80,7 +79,6 @@ pub enum CheckpointStatus {
IO,
}
#[cfg(feature = "fs")]
impl Wal for WalFile {
/// Begin a read transaction.
fn begin_read_tx(&self) -> Result<()> {
@@ -232,7 +230,6 @@ impl Wal for WalFile {
}
}
#[cfg(feature = "fs")]
impl WalFile {
pub fn new(io: Arc<dyn IO>, wal_path: String, page_size: usize) -> Self {
Self {