mini\Table\Index\BTreeInternalPage
final
class
Documentation
Parsed internal page - children are page numbers, keys are separators.
Page format:
- Header: type(1) + count(2) + children((n+1) * 4) + offsets((n+1) * 2)
- Key data: keys concatenated (keyLen = offsets[i+1] - offsets[i])
Children are 32-bit page numbers (supports up to 16TB with 4KB pages). Keys are parsed eagerly since internal pages are cached and reused. Uses 0-based indexing: children[0..n], keys[0..n-1].
Properties (6)
int $childCount
Number of children
array $children
array $keys
array $writeBuffer
Parent internal node (null for root). Not serialized.
string $promoteKey
Separator key for this page when split from sibling. Not serialized.
Methods (8)
Documentation missing
Get an internal page and set children/keys.
Update children and keys in place (for overlay modification).
Serialize to binary page format.
Documentation missing
Calculate the size this page will have when serialized.
Import writeBuffer into children/keys in sorted order.
Split this internal page into pages that fit within maxSize.