2.2.2.7.7.1 BTPAGE
A BTPAGE structure implements a generic BTree using 512-byte pages.
Unicode:
|
|
|
|
|
|
|
|
|
|
1 |
|
|
|
|
|
|
|
|
|
2 |
|
|
|
|
|
|
|
|
|
3 |
|
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
rgentries (488 bytes) |
|||||||||||||||||||||||||||||||
... |
|||||||||||||||||||||||||||||||
... |
|||||||||||||||||||||||||||||||
cEnt |
cEntMax |
cbEnt |
cLevel |
||||||||||||||||||||||||||||
dwPadding |
|||||||||||||||||||||||||||||||
pageTrailer (16 bytes) |
|||||||||||||||||||||||||||||||
... |
|||||||||||||||||||||||||||||||
... |
ANSI:
|
|
|
|
|
|
|
|
|
|
1 |
|
|
|
|
|
|
|
|
|
2 |
|
|
|
|
|
|
|
|
|
3 |
|
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
rgentries (496 bytes) |
|||||||||||||||||||||||||||||||
... |
|||||||||||||||||||||||||||||||
... |
|||||||||||||||||||||||||||||||
cEnt |
cEntMax |
cbEnt |
cLevel |
||||||||||||||||||||||||||||
pageTrailer (12 bytes) |
|||||||||||||||||||||||||||||||
... |
|||||||||||||||||||||||||||||||
... |
rgentries (Unicode: 488 bytes; ANSI: 496 bytes): Entries of the BTree array. The entries in the array depend on the value of the cLevel field. If cLevel is greater than 0, then each entry in the array is of type BTENTRY. If cLevel is 0, then each entry is either of type BBTENTRY or NBTENTRY, depending on the ptype of the page.
cEnt (1 byte): The number of BTree entries stored in the page data.
cEntMax (1 byte): The maximum number of entries that can fit inside the page data.
cbEnt (1 byte): The size of each BTree entry, in bytes. Note that in some cases, cbEnt can be greater than the corresponding size of the corresponding rgentries structure because of alignment or other considerations. Implementations MUST use the size specified in cbEnt to advance to the next entry.
BTree Type |
cLevel |
rgentries structure |
cbEnt (bytes) |
---|---|---|---|
NBT |
0 |
NBTENTRY |
ANSI: 16, Unicode: 32 |
Greater than 0 |
BTENTRY |
ANSI: 12, Unicode: 24 |
|
BBT |
0 |
BBTENTRY |
ANSI: 12, Unicode: 24 |
Less than 0 |
BTENTRY |
ANSI: 12, Unicode: 24 |
cLevel (1 byte): The depth level of this page. Leaf pages have a level of zero, whereas intermediate pages have a level greater than 0. This value determines the type of the entries in rgentries, and is interpreted as unsigned.
dwPadding (Unicode: 4 bytes): Padding; MUST be set to zero. Note there is no padding in the ANSI version of this structure.
pageTrailer (Unicode: 16 bytes; ANSI: 12 bytes): A PAGETRAILER structure (section 2.2.2.7.1). The ptype subfield of pageTrailer MUST be set to ptypeBBT for a Block BTree page, or ptypeNBT for a Node BTree page. The other subfields of pageTrailer MUST be set as specified in section 2.2.2.7.1.