Expand description
Database file header (page 0).
The first 28 bytes of every .sqlrite file identify the format and point
at the schema catalog. The rest of page 0 is reserved for future use.
Structs§
- DbHeader
- Parsed header.
page_countincludes page 0 itself.
Constants§
- FORMAT_
VERSION - On-disk format revision. Bump when the page layout changes incompatibly.
- MAGIC
- File magic. Distinct from SQLite’s
"SQLite format 3\0"so the formats can’t be confused on inspection.
Functions§
- decode_
header - Decodes the header from a
PAGE_SIZE-sized buffer. Returns an error if magic bytes, format version, or page size don’t match what we wrote. - encode_
header - Encodes the header into a
PAGE_SIZE-sized buffer.