From 957cc383c88fec986e36dec8f6306ccca2da2043 Mon Sep 17 00:00:00 2001 From: Pekka Enberg Date: Thu, 1 Aug 2024 11:52:18 +0300 Subject: [PATCH] core: Fix module documentation format in sqlite3_ondisk.rs --- core/sqlite3_ondisk.rs | 85 +++++++++++++++++++++--------------------- 1 file changed, 43 insertions(+), 42 deletions(-) diff --git a/core/sqlite3_ondisk.rs b/core/sqlite3_ondisk.rs index 82c136b51..b01ed4ab2 100644 --- a/core/sqlite3_ondisk.rs +++ b/core/sqlite3_ondisk.rs @@ -1,45 +1,46 @@ -/// SQLite on-disk file format. -/// -/// SQLite stores data in a single database file, which is divided into fixed-size -/// pages: -/// -/// ```text -/// +----------+----------+----------+-----------------------------+----------+ -/// | | | | | | -/// | Page 1 | Page 2 | Page 3 | ... | Page N | -/// | | | | | | -/// +----------+----------+----------+-----------------------------+----------+ -/// ``` -/// -/// The first page is special because it contains a 100 byte header at the beginning. -/// -/// Each page consists of a page header and N cells, which contain the records. -/// -/// ```text -/// +-----------------+----------------+---------------------+----------------+ -/// | | | | | -/// | Page header | Cell pointer | Unallocated | Cell content | -/// | (8 or 12 bytes) | array | space | area | -/// | | | | | -/// +-----------------+----------------+---------------------+----------------+ -/// ``` -/// -/// The write-ahead log (WAL) is a separate file that contains the physical -/// log of changes to a database file. The file starts with a WAL header and -/// is followed by a sequence of WAL frames, which are database pages with -/// additional metadata. -/// -/// ```text -/// +-----------------+-----------------+-----------------+-----------------+ -/// | | | | | -/// | WAL header | WAL frame 1 | WAL frame 2 | WAL frame N | -/// | | | | | -/// +-----------------+-----------------+-----------------+-----------------+ -/// ``` -/// -/// For more information, see the SQLite file format specification: -/// -/// https://www.sqlite.org/fileformat.html +//! SQLite on-disk file format. +//! +//! SQLite stores data in a single database file, which is divided into fixed-size +//! pages: +//! +//! ```text +//! +----------+----------+----------+-----------------------------+----------+ +//! | | | | | | +//! | Page 1 | Page 2 | Page 3 | ... | Page N | +//! | | | | | | +//! +----------+----------+----------+-----------------------------+----------+ +//! ``` +//! +//! The first page is special because it contains a 100 byte header at the beginning. +//! +//! Each page consists of a page header and N cells, which contain the records. +//! +//! ```text +//! +-----------------+----------------+---------------------+----------------+ +//! | | | | | +//! | Page header | Cell pointer | Unallocated | Cell content | +//! | (8 or 12 bytes) | array | space | area | +//! | | | | | +//! +-----------------+----------------+---------------------+----------------+ +//! ``` +//! +//! The write-ahead log (WAL) is a separate file that contains the physical +//! log of changes to a database file. The file starts with a WAL header and +//! is followed by a sequence of WAL frames, which are database pages with +//! additional metadata. +//! +//! ```text +//! +-----------------+-----------------+-----------------+-----------------+ +//! | | | | | +//! | WAL header | WAL frame 1 | WAL frame 2 | WAL frame N | +//! | | | | | +//! +-----------------+-----------------+-----------------+-----------------+ +//! ``` +//! +//! For more information, see the SQLite file format specification: +//! +//! https://www.sqlite.org/fileformat.html + use crate::buffer_pool::BufferPool; use crate::error::LimboError; use crate::io::{Buffer, Completion, ReadCompletion, WriteCompletion};