10#ifndef _SWATDB_HASHINDEXFILE_H_
11#define _SWATDB_HASHINDEXFILE_H_
36static const std::uint32_t MAX_HASH_SIZE =
94 relation, std::vector<std::string> field_list);
113 relation, std::vector<FieldId> field_list);
Catalog * catalog
Definition file.h:124
BufferManager * buf_mgr
Definition file.h:129
Definition hashbucketpage.h:95
Definition hashindexfile.h:71
HashIndexHeader getHeader()
THIS METHOD IS FOR DEBUGGING ONLY. Returns the current HashIndexHeader.
PageId _splitPage(HashIndexHeader *file_header, HashBucketPage *bucket_page, PageId bucket_page_id)
Helper function for splitting a bucket.
void createHeader()
Allocates and initializes the header Page of the file.
HashIndexFile(Catalog *catalog, BufferManager *buf_mgr, FileId relation, std::vector< FieldId > field_list)
Constructor for IndexFile class.
HashIndexFile(Catalog *catalog, BufferManager *buf_mgr, FileId relation, std::vector< std::string > field_list)
Constructor for IndexFile class.
void flushHeader()
Flushes header Page to disk.
std::vector< RecordId > getEntries(Key key)
Returns a list all RecordIds with the given Key.
void insertEntry(Key key, RecordId record_id)
Inserts an Entry into the HashIndexFile.
void deleteEntry(Key key, RecordId record_id)
Method for deleting an entry of the given Key and RecordId.
~HashIndexFile()
Destructor. Data members are cleaned up, but none of the dynamically allocated data members are delet...
std::pair< SlotId, SlotId > _findDirSlot(HashVal hash_val, Level level)
Helper function for computing the location of the slot for PageNum of the bucket, corresponding to th...
void deleteKey(Key key)
Method for deleting all entires with the given key.
void _levelUp(HashIndexHeader *file_header)
Helper function for incrementing the global level of the hash index.
Definition hashindexscanner.h:41
Definition indexfile.h:41
FileId relation
Definition indexfile.h:133
Definition swatdb_types.h:54
Definition swatdb_types.h:70
std::uint32_t FileId
Definition swatdb_types.h:33
std::uint32_t Level
Definition swatdb_types.h:130
const std::uint32_t PAGE_SIZE
Definition swatdb_types.h:258
std::uint32_t HashVal
Definition swatdb_types.h:136
std::uint32_t PageNum
Definition swatdb_types.h:38