1 #ifndef INDEX_BTREE_BTREEINTERNAL_H
2 #define INDEX_BTREE_BTREEINTERNAL_H
115 return const_cast<char*
>(
reinterpret_cast<const char*
>(
this)) +
134 return const_cast<char*
>(
reinterpret_cast<const char*
>(
this)) +
151 static inline const char*
156 static inline const RecordId&
static FieldOffset ComputeFreeSpace(FieldOffset usr_data_sz, SlotId num_recs, FieldOffset total_reclen)
Computes the size of the free space on the page if there are num_recs records inserted to an empty Va...
Definition: VarlenDataPage.cpp:526
constexpr FieldOffset BTREE_MAX_RECORD_SIZE
Definition: BTreeInternal.h:187
constexpr uint16_t BTREE_PAGE_ISLEAF
Definition: BTreeInternal.h:37
constexpr size_t BTreeLeafRecordHeaderSize
Definition: BTreeInternal.h:139
static FieldOffset BTreeComputePageUsage(SlotId num_recs, FieldOffset totrlen)
Returns the page usage of a B-Tree page given its number of records and its total length of all the r...
Definition: BTreeInternal.h:170
constexpr size_t BTreeInternalRecordHeaderSize
Definition: BTreeInternal.h:120
constexpr size_t BTreePageHeaderSize
Definition: BTreeInternal.h:92
constexpr SlotId MaxSlotId
The maximum valid slot ID.
Definition: tdb_base.h:264
uint16_t SlotId
Definition: tdb_base.h:222
int16_t FieldOffset
Definition: tdb_base.h:211
static const RecordId & BTreeRecordGetHeapRecordId(const char *recbuf, bool isleaf)
Definition: BTreeInternal.h:157
uint32_t PageNumber
Definition: tdb_base.h:213
constexpr FieldOffset BTREE_MIN_PAGE_USAGE
Definition: BTreeInternal.h:189
constexpr PageNumber RESERVED_PID
An invalid page number reserved for file manager internal use.
Definition: tdb_base.h:242
static const RecordId INFINITY_RECORDID
This is the record number that is guaranteed to be larger than any valid record ID.
Definition: BTreeInternal.h:16
constexpr uint16_t BTREE_PAGE_ISROOT
Definition: BTreeInternal.h:36
static char * BTreeRecordGetPayload(char *recbuf, bool isleaf)
Definition: BTreeInternal.h:143
The B-tree meta page.
Definition: BTreeInternal.h:21
PageHeaderData m_ph
Definition: BTreeInternal.h:22
static void Initialize(char *btmeta_buf, PageNumber root_pid)
Initializes the B-tree meta page.
Definition: BTreeUtils.cpp:8
PageNumber m_root_pid
The page number of the B-Tree root page.
Definition: BTreeInternal.h:28
The record ID of a record on a page is a pair of ‘(PageNumber, SlotId)’.
Definition: Record.h:17
#define MAXALIGN(LEN)
Definition: tdb_base.h:327
constexpr const size_t PAGE_SIZE
Definition: tdb_base.h:159