Skip to main content

clt_database/storage/
mod.rs

1//! The storage layer.
2//!
3//! This module contains the storage layer for Limbo. The storage layer is
4//! responsible for managing access to the database and its pages. The main
5//! interface to the storage layer is the `Pager` struct, which is
6//! responsible for managing the database file and the pages it contains.
7//!
8//! Pages in a database are stored in one of the following to data structures:
9//! `DatabaseStorage` or `Wal`. The `DatabaseStorage` trait is responsible
10//! for reading and writing pages to the database file, either local or
11//! remote. The `Wal` struct is responsible for managing the write-ahead log
12//! for the database, also either local or remote.
13pub(crate) mod btree;
14pub(crate) mod buffer_pool;
15pub(crate) mod checksum;
16pub mod database;
17pub(crate) mod encryption;
18pub(crate) mod journal_mode;
19pub(crate) mod page_cache;
20#[allow(clippy::arc_with_non_send_sync)]
21pub(crate) mod pager;
22#[cfg(host_shared_wal)]
23#[allow(dead_code)]
24pub(crate) mod shared_wal_coordination;
25#[allow(dead_code)]
26pub(super) mod slot_bitmap;
27pub mod sqlite3_ondisk;
28mod state_machines;
29pub(crate) mod subjournal;
30#[allow(clippy::arc_with_non_send_sync)]
31pub(crate) mod wal;
32
33#[macro_export]
34macro_rules! return_corrupt {
35    ($($arg:tt)*) => {
36        return Err(LimboError::Corrupt(format!($($arg)*)));
37    };
38}