12#ifndef _SWATDB_HEAPFILE_H_
13#define _SWATDB_HEAPFILE_H_
Definition blockheapfilescanner.h:35
Catalog * catalog
Definition file.h:124
BufferManager * buf_mgr
Definition file.h:129
Definition heapfilescanner.h:39
std::uint32_t getNumFullPages()
Returns the number of full pages in the file.
void flushHeader()
Flushes header Page to disk.
PageId atomicAppend(PageId orig_pid)
Atomic append a page for heapfile. Acquires a mutex, adds page at the beginning of full list,...
void deleteRecord(RecordId record_id)
Deletes the Record identified by the given RecordId.
HeapFileHeader getHeader()
THIS METHOD IS FOR DEBUGGING ONLY. Returns the current HeapFileHeader.
void updateRecord(RecordId record_id, Record record)
Updates the record data in the HeapFile identified by the given RecordId to the data in the provided ...
RecordId insertRecord(Record record)
Inserts a Record into the HeapFile.
PageId anonAppend(PageId orig_pid)
Copies a page and inserts the copy into the begining of the full list. The contents are reset.
std::uint32_t getNumPages()
Returns the number of pages in the file.
std::uint64_t getNumRecords()
Returns the number of records in the file.
HeapFile(Catalog *catalog, BufferManager *buf_mgr, Schema *schema)
Constructor for HeapFile class.
void getRecord(RecordId record_id, Record *record)
Sets the record_data of the given Record pointer to the data corresponding to the given RecordId.
std::uint64_t getNumRecs()
This method returns the number of records in a file.
void createHeader()
Allocates and initializes the header Page of the file.
~HeapFile()
HeapFile destructor.
Definition heappagescanner.h:33
Definition relationfile.h:32
Schema * schema
Definition relationfile.h:105
Definition swatdb_types.h:54
Definition swatdb_types.h:70
std::uint32_t PageNum
Definition swatdb_types.h:38