12#ifndef _SWATDB_HEAPPAGE_H_
13#define _SWATDB_HEAPPAGE_H_
380 SlotId _getFreeSlot();
398 SlotInfo* _getSlotInfo(SlotId slot_id);
427 void _insertRecord(SlotId slot_id,
Data* record_data);
460 void _deleteRecord(SlotId slot_id);
Definition heappagescanner.h:33
void removeAll()
Removes all the records from the page.
std::uint32_t getInvalidNum()
THIS METHOD IS FOR DEBUGGING ONLY.
SlotInfo getSlotInfo(SlotId slot_id)
THIS METHOD IS FOR DEBUGGING ONLY.
SlotId insertRecord(Data *record_data)
Inserts given record data to the Page.
std::uint32_t getNumRecs()
Returns the amount of records in the page.
HeapPageHeader * _getPageHeader()
Getter for the Page header.
void deleteRecord(SlotId slot_id)
Deletes record identified by SlotId.
void updateRecord(SlotId slot_id, Data *record_data)
Updates record identified by SlotId.
~HeapPage()
Definition heappage.h:113
void setPrev(PageNum page_num)
Set prev_page to the given PageNum.
PageNum getPrev()
Getter for prev_page.
bool isEmpty()
bool function indicating whether the Page is empty.
bool isFull()
bool function indicating whether the Page is full.
void getRecord(SlotId slot_id, Data *data)
Gets the record identified by its SlotId.
void setNext(PageNum page_num)
Sets next_page to the given PageNum.
HeapPageHeader getHeader()
THIS METHOD IS FOR DEBUGGING ONLY. Returns this HeapPage's header information.
HeapPage()=delete
Constructor.
SlotInfo * _getSlotDirectory()
Return pointer to the where slot directory begins (first SlotInfo)
PageNum getNext()
Getter for next_page.
void zeroFreeSpace()
zeroes out the free space on a heap page.
void initializeHeader()
Initializes header information after the Page is allocated.
std::uint32_t getFreeSpace()
Getter for the amount of free space on the Page that is available to insert a new record.
void printHeapPageState()
THIS METHOD IS FOR DEBUGGING ONLY. Prints the current state of the HeapPage.
char data[PAGE_SIZE]
char array that stores the page data. Derived classes could map appropriate structures on it.
Definition page.h:60
Definition hashbucketpage.h:76
uint32_t offset
Definition heappage.h:81
uint32_t length
Definition heappage.h:86
std::uint32_t PageNum
Definition swatdb_types.h:38