taco-db  0.1.0
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
taco::BTreePageHeaderData Struct Reference

The B-Tree page header for both internal pages and the leaf pages. More...

#include <index/btree/BTreeInternal.h>

Public Member Functions

constexpr bool IsRootPage () const
 
constexpr bool IsLeafPage () const
 

Static Public Member Functions

static void Initialize (char *pagebuf, uint16_t flags, PageNumber prev_pid, PageNumber next_pid)
 Initializes the B-tree internal/leaf page as a data page, and then initializes the BTreePageHeaderData (as its user data area). More...
 

Public Attributes

uint16_t m_flags
 Flags, see BTREE_PAGE_xxx above. More...
 
FieldOffset m_totrlen
 The total length of index records on this page. More...
 
PageNumber m_prev_pid
 The previous page's page number on this level, or INVALID_PID if this page is the first page on this level. More...
 
PageNumber m_next_pid
 The next page's page number on this level, or INVALID_PID if this page is the last page on this level. More...
 
uint32_t m_reserved
 Currently unused. More...
 

Detailed Description

The B-Tree page header for both internal pages and the leaf pages.

Member Function Documentation

◆ Initialize()

void taco::BTreePageHeaderData::Initialize ( char *  pagebuf,
uint16_t  flags,
PageNumber  prev_pid,
PageNumber  next_pid 
)
static

Initializes the B-tree internal/leaf page as a data page, and then initializes the BTreePageHeaderData (as its user data area).

◆ IsLeafPage()

constexpr bool taco::BTreePageHeaderData::IsLeafPage ( ) const
inlineconstexpr

◆ IsRootPage()

constexpr bool taco::BTreePageHeaderData::IsRootPage ( ) const
inlineconstexpr

Member Data Documentation

◆ m_flags

uint16_t taco::BTreePageHeaderData::m_flags

Flags, see BTREE_PAGE_xxx above.

◆ m_next_pid

PageNumber taco::BTreePageHeaderData::m_next_pid

The next page's page number on this level, or INVALID_PID if this page is the last page on this level.

◆ m_prev_pid

PageNumber taco::BTreePageHeaderData::m_prev_pid

The previous page's page number on this level, or INVALID_PID if this page is the first page on this level.

◆ m_reserved

uint32_t taco::BTreePageHeaderData::m_reserved

Currently unused.

◆ m_totrlen

FieldOffset taco::BTreePageHeaderData::m_totrlen

The total length of index records on this page.

This is used for estimating when the page is half full.


The documentation for this struct was generated from the following files: