110 void set(
int p, T k)
125 if( r1.key != r2.key )
126 return r1.key < r2.key;
128 return r1.rid.page_number < r2.rid.page_number;
360 Page *currentPageData;
375 std::string lowValString;
385 double highValDouble;
390 std::string highValString;
417 BTreeIndex(
const std::string & relationName, std::string & outIndexName,
418 BufMgr *bufMgrIn,
const int attrByteOffset,
const Datatype attrType);
Datatype
Datatype enumeration type.
The central class which manages the buffer pool including frame allocation and deallocation to pages ...
const int INTARRAYNONLEAFSIZE
Number of key slots in B+Tree non-leaf for INTEGER key.
RecordId ridArray[INTARRAYLEAFSIZE]
const int DOUBLEARRAYLEAFSIZE
Number of key slots in B+Tree leaf for DOUBLE key.
const int DOUBLEARRAYNONLEAFSIZE
Number of key slots in B+Tree leaf for DOUBLE key.
int keyArray[INTARRAYLEAFSIZE]
PageId pageNoArray[STRINGARRAYNONLEAFSIZE+1]
double keyArray[DOUBLEARRAYLEAFSIZE]
const int INTARRAYLEAFSIZE
Number of key slots in B+Tree leaf for INTEGER key.
char keyArray[STRINGARRAYNONLEAFSIZE][STRINGSIZE]
Class which represents a file in the filesystem containing database pages.
Operator
Scan operations enumeration. Passed to BTreeIndex::startScan() method.
RecordId ridArray[DOUBLEARRAYLEAFSIZE]
std::uint32_t PageId
Identifier for a page in a file.
static const std::size_t SIZE
PageId pageNoArray[DOUBLEARRAYNONLEAFSIZE+1]
Structure for all non-leaf nodes when the key is of INTEGER type.
Class which represents a fixed-size database page containing records.
BTreeIndex(const std::string &relationName, std::string &outIndexName, BufMgr *bufMgrIn, const int attrByteOffset, const Datatype attrType)
Structure for all non-leaf nodes when the key is of DOUBLE type.
BTreeIndex class. It implements a B+ Tree index on a single attribute of a relation. This index supports only one scan at a time.
const void scanNext(RecordId &outRid)
const int STRINGARRAYLEAFSIZE
Number of key slots in B+Tree leaf for STRING key.
RecordId ridArray[STRINGARRAYLEAFSIZE]
double keyArray[DOUBLEARRAYNONLEAFSIZE]
Structure for all leaf nodes when the key is of INTEGER type.
Identifier for a record in a page.
char keyArray[STRINGARRAYLEAFSIZE][STRINGSIZE]
const void insertEntry(const void *key, const RecordId rid)
Structure for all leaf nodes when the key is of STRING type.
Structure to store a key page pair which is used to pass the key and page to functions that make any ...
const int STRINGSIZE
Size of String key.
Structure for all leaf nodes when the key is of DOUBLE type.
Structure to store a key-rid pair. It is used to pass the pair to functions that add to or make chang...
int keyArray[INTARRAYNONLEAFSIZE]
PageId pageNoArray[INTARRAYNONLEAFSIZE+1]
const int STRINGARRAYNONLEAFSIZE
Number of key slots in B+Tree leaf for STRING key.
Structure for all non-leaf nodes when the key is of STRING type.
const void startScan(const void *lowVal, const Operator lowOp, const void *highVal, const Operator highOp)