CLASS BTreeFile

#include <btfile.h>

BTreeFile implements the B+-Tree index. Duplicates in keys are allowed.

Methods

BTreeFile::BTreeFile(Status &s, const char *filename)

This constructor open an existing B+-Tree with name filename. s will be set to OK if succesfull and set to FAIL otherwise.
BTreeFile::BTreeFile(Status &s, const char *filename, const AttrType keyType, const int keySize)
This constructor open an existing B+-Tree with name filename. If the index does not exist, create it. keyType indicates the type of the key and keySize specifies the maximum length of the key, in bytes. s will be set to OK if succesfull and set to FAIL otherwise.
Status Insert(const void *key, const RecordID rid)
Insert the entry (key, rid) into the B+-Tree.
Status Delete(const void *key, const RecordID &rid)
Delete the entry (key, rid) from the B+-Tree
Status DestroyFile()
Destroy the B+-Tree by deleting it completely from the database.
IndexFileScan *OpenSearchScan(void* lowKey, void* highKey)
Create a scan on this B+-Tree. The scan only scans from key value lowKey to highKey. If lowKey is NULL, the scan will start scanning from the minimum key value. If highKey is NULL, scan will scan until the highest key value.