Expand description
Page layout primitives.
Every database file is a sequence of fixed-size pages. Page 0 holds the
DbHeader; every other page is a typed, chained payload container.
Layout of a non-header page (PAGE_SIZE bytes total):
0..1 PageType tag (u8)
1..5 next-page (u32 LE; 0 = end of chain)
5..7 payload length (u16 LE; bytes used in the payload area)
7..end payload bytesEnums§
- Page
Type - Identifies what kind of content a page holds.
Constants§
- PAGE_
HEADER_ SIZE - Bytes consumed by the per-page header (type + next-ptr + payload-len).
- PAGE_
SIZE - Size of every page in bytes. SQLite’s default too — small enough to fit in one disk sector group, large enough to carry meaningful payload.
- PAYLOAD_
PER_ PAGE - Usable payload bytes per page after subtracting the header.