Turnstone Operating System
|
b+ tree indexer interface More...
Macros | |
#define | ___BPLUSTREE_H 0 |
#define | bplustree_create_index(mkc, c) bplustree_create_index_with_heap_and_unique(NULL, mkc, c, false) |
creates b+ tree index with default heap More... | |
#define | bplustree_create_index_with_unique(mkc, c, u) bplustree_create_index_with_heap_and_unique(NULL, mkc, c, u) |
creates b+ tree index with default heap More... | |
#define | bplustree_create_index_with_heap(h, mkc, c) bplustree_create_index_with_heap_and_unique(h, mkc, c, false) |
creates b+ tree index with default heap More... | |
Typedefs | |
typedef int8_t(* | bplustree_key_destroyer_f) (memory_heap_t *heap, void *key) |
typedef int8_t(* | bplustree_key_cloner_f) (memory_heap_t *heap, const void *key, void **cloned_key) |
Functions | |
index_t * | bplustree_create_index_with_heap_and_unique (memory_heap_t *heap, uint64_t max_key_count, index_key_comparator_f comparator, boolean_t unique) |
creates b+ tree index implementation More... | |
int8_t | bplustree_destroy_index (index_t *idx) |
destroys index More... | |
int8_t | bplustree_set_comparator_for_unique_subpart_for_non_unique_index (index_t *idx, index_key_comparator_f comparator) |
sets a comparator for unique subpart for non unique index More... | |
int8_t | bplustree_set_key_destroyer (index_t *idx, bplustree_key_destroyer_f destroyer) |
sets a key destroyer for index More... | |
int8_t | bplustree_set_key_cloner (index_t *idx, bplustree_key_cloner_f cloner) |
sets a key cloner for index More... | |
b+ tree indexer interface
This work is licensed under TURNSTONE OS Public License. Please read and understand latest version of Licence.
#define ___BPLUSTREE_H 0 |
prevent duplicate header error macro
#define bplustree_create_index | ( | mkc, | |
c | |||
) | bplustree_create_index_with_heap_and_unique(NULL, mkc, c, false) |
creates b+ tree index with default heap
[in] | mkc | max key count |
[in] | c | comparator |
#define bplustree_create_index_with_heap | ( | h, | |
mkc, | |||
c | |||
) | bplustree_create_index_with_heap_and_unique(h, mkc, c, false) |
creates b+ tree index with default heap
[in] | h | heap to use |
[in] | mkc | max key count |
[in] | c | comparator |
#define bplustree_create_index_with_unique | ( | mkc, | |
c, | |||
u | |||
) | bplustree_create_index_with_heap_and_unique(NULL, mkc, c, u) |
creates b+ tree index with default heap
[in] | mkc | max key count |
[in] | c | comparator |
[in] | u | unique flag |
index_t * bplustree_create_index_with_heap_and_unique | ( | memory_heap_t * | heap, |
uint64_t | max_key_count, | ||
index_key_comparator_f | comparator, | ||
boolean_t | unique | ||
) |
creates b+ tree index implementation
heap | heap to use |
max_key_count | maximum key count at each tree node |
comparator | key comparator |
unique | if unique flag set remove and insert key,value |
destroys index
[in] | idx | index to be destroyed |
destroys only b+tree not data. if data will not be destroyed a memory leak will be happened.
int8_t bplustree_set_comparator_for_unique_subpart_for_non_unique_index | ( | index_t * | idx, |
index_key_comparator_f | comparator | ||
) |
sets a comparator for unique subpart for non unique index
[in] | idx | index |
[in] | comparator | comparator |
sets a key cloner for index
[in] | idx | index |
[in] | cloner | cloner |