#include "btree.h"
-BTree::BTree (const std::string &name, unsigned int block_size, bool create_new_file)
+BTree::BTree (const std::string &name, unsigned int block_size, int kt, bool create_new_file)
{
+ key_type = kt;
uchar *node;
BTreeNodeHeader nh;
/* TODO : Detectar si estoy en una hoja */
BTreeData *data;
if (node_header.level == 0) {
- data = new BTreeLeafData (node);
+ data = new BTreeLeafData (node, key_type);
} else {
- data = new BTreeData (node);
+ data = new BTreeData (node, key_type);
}
node += data->Size ();
keys.push_back (data);