mirror of
https://github.com/aljazceru/turso.git
synced 2026-01-06 17:54:20 +01:00
Merge 'Beginnings of AUTOVACUUM' from Zaid Humayun
This PR adds the beginnings of [AUTOVACUUM](https://www.sqlite.org/lang_vacuum.html) to Limbo. It adds a feature flag called `omit_autovacuum` which is analogous to `SQLITE_OMIT_AUTOVACUUM`. It is off by default, same as SQLite. It introduces the concept of [pointer map pages](https://www.sqlite.org/ fileformat.html#pointer_map_or_ptrmap_pages) which are reverse index pages used to map pages to their parents. This is used to swap pages (when a table is deleted for instance) to keep root pages clustered at the beginning of the file. It's also used while creating a table to ensure that root pages are clustered at the beginning (although, this isn't completely implemented yet) Finally, it also adds a couple of missing instructions like `Int64` that are required for `PRAGMA` commands related to `auto_vacuum` settings <img width="1512" alt="Screenshot 2025-05-28 at 8 47 51 PM" src="https://github.com/user- attachments/assets/d52eb74f-5b79-4d52-9401-1bdc2dcc304d" /> Closes #1600
This commit is contained in:
@@ -1655,6 +1655,8 @@ pub type PragmaValue = Expr; // TODO
|
||||
#[derive(Clone, Debug, PartialEq, Eq, EnumIter, EnumString, strum::Display)]
|
||||
#[strum(serialize_all = "snake_case")]
|
||||
pub enum PragmaName {
|
||||
/// set the autovacuum mode
|
||||
AutoVacuum,
|
||||
/// `cache_size` pragma
|
||||
CacheSize,
|
||||
/// `journal_mode` pragma
|
||||
|
||||
Reference in New Issue
Block a user