xale-db 1.0
minimal SQL engine, written in c++
Loading...
Searching...
No Matches
Xale::DataStructure::BPlusTree< TKey, TValue > Class Template Reference

BPlus Tree implementation. More...

#include <BPlusTree.h>

Collaboration diagram for Xale::DataStructure::BPlusTree< TKey, TValue >:
Collaboration graph

Public Member Functions

 BPlusTree (int maxKeys)
 B+Tree constructor.
bool insert (TKey key, TValue *value)
 Insert a key-value pair into the B+ Tree.
bool remove (TKey key)
 Remove a key from the B+ Tree.
TValue * search (TKey key)
 Search for a key in the B+ Tree.

Detailed Description

template<typename TKey, typename TValue>
class Xale::DataStructure::BPlusTree< TKey, TValue >

BPlus Tree implementation.

Constructor & Destructor Documentation

◆ BPlusTree()

template<typename TKey, typename TValue>
Xale::DataStructure::BPlusTree< TKey, TValue >::BPlusTree ( int maxKeys)

B+Tree constructor.

Parameters
maxKeysMaximum number of keys per node

Member Function Documentation

◆ insert()

template<typename TKey, typename TValue>
bool Xale::DataStructure::BPlusTree< TKey, TValue >::insert ( TKey key,
TValue * value )

Insert a key-value pair into the B+ Tree.

Parameters
keyThe key to insert
valueThe value associated with the key
Returns
True if insertion is successful, false otherwise

◆ remove()

template<typename TKey, typename TValue>
bool Xale::DataStructure::BPlusTree< TKey, TValue >::remove ( TKey key)

Remove a key from the B+ Tree.

Parameters
keyThe key to remove
Returns
True if removal is successful, false otherwise

◆ search()

template<typename TKey, typename TValue>
TValue * Xale::DataStructure::BPlusTree< TKey, TValue >::search ( TKey key)

Search for a key in the B+ Tree.

Parameters
keyThe key to search for
Returns
Pointer to the value associated with the key, or nullptr if not found

The documentation for this class was generated from the following file: