tinySQL
0.1
A self-contained database management system
|
4 #include "share/data_t.h"
5 #include "share/config.h"
6 #include "share/err_type.h"
7 #include "catalog/catalog.h"
8 #include "index/bpTree_disk.h"
9 #include "buffer/buffer_manager.h"
37 void DropIndex(
const std::string& indexName);
47 void UpdateId(
const std::string &indexName,
const Data &key,
const Index_t &new_rec_ptr);
49 void UpdateKey(
const std::string &indexName,
const Data &key,
const Data &new_key);
58 void DeleteId(
const std::string& indexName,
const Data &key);
60 bool CheckExistance(
const std::string& indexName,
const Data &key, Index_t &
id);
70 bool FindId(
const std::string& indexName,
const Data &key, Index_t &result);
83 bool FindId(
const std::string& indexName,
const Data &lower_key,
const Data &upper_key, std::vector<Index_t>& result);
95 void InsertId(
const std::string& indexName,
const Data &Key,
const Index_t &rec_ptr);
98 std::string _indexName;
Buffer manager is an abstraction of memory on computer for modules at higher level.
bool FindId(const std::string &indexName, const Data &key, Index_t &result)
Find the Index based on the key (cell)
void DeleteId(const std::string &indexName, const Data &key)
Delete an has_index of a certain key.
void InsertId(const std::string &indexName, const Data &Key, const Index_t &rec_ptr)
Insert a key into the has_index table The user should make sure that the file exists....
void DropIndex(const std::string &indexName)
Drop an Index of an attr. User should make sure the table exists.
void UpdateId(const std::string &indexName, const Data &key, const Index_t &new_rec_ptr)
Update the pointer of a record in the has_index file.
void CreateIndex(const std::string &indexName)
Create an Index of an attr. Actually creates an has_index file with a head block. File name conventio...
Basic cell element in a tuples.