mirror of
https://github.com/tursodatabase/limbo.git
synced 2025-08-04 10:08:20 +00:00
core: Rename PageIO to DatabaseStorage
This commit is contained in:
parent
4349b946e5
commit
8a54e31803
5 changed files with 16 additions and 14 deletions
|
@ -7,7 +7,7 @@ pub(crate) mod wal;
|
|||
use crate::{error::LimboError, io::Completion, Buffer, Result};
|
||||
use std::{cell::RefCell, rc::Rc};
|
||||
|
||||
pub trait PageIO {
|
||||
pub trait DatabaseStorage {
|
||||
fn get(&self, page_idx: usize, c: Rc<Completion>) -> Result<()>;
|
||||
fn write(&self, page_idx: usize, buffer: Rc<RefCell<Buffer>>, c: Rc<Completion>) -> Result<()>;
|
||||
}
|
||||
|
@ -18,7 +18,7 @@ pub struct FileStorage {
|
|||
}
|
||||
|
||||
#[cfg(feature = "fs")]
|
||||
impl PageIO for FileStorage {
|
||||
impl DatabaseStorage for FileStorage {
|
||||
fn get(&self, page_idx: usize, c: Rc<Completion>) -> Result<()> {
|
||||
let r = match &(*c) {
|
||||
Completion::Read(r) => r,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue