#include "../dictionary_types.h"
#include "./../dictionary.h"
#include "../../key_value/kv_system.h"
#include "../../file/linked_file_bag.h"
#include "bpp_tree.h"
Description
The handler for a disk-backed B+ Tree.
- Copyright
- Copyright 2017 The University of British Columbia, IonDB Project Contributors (see AUTHORS.md)
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
- 1.Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
- 2.Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
- 3.Neither the name of the copyright holder nor the names of its contributors
- may be used to endorse or promote products derived from this software without specific prior written permission.
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Definition in file bpp_tree_handler.h.
Include dependency graph for bpp_tree_handler.h:
This graph shows which files directly or indirectly include this file:
Classes | |
struct | bplusplustree |
struct | ion_bpp_cursor_t |
Typedefs | |
typedef struct bplusplustree | ion_bpptree_t |
Functions | |
void | bpptree_init (ion_dictionary_handler_t *handler) |
Registers a specific handler for a dictionary instance. More... | |
Typedef Documentation
typedef struct bplusplustree ion_bpptree_t |
Function Documentation
void bpptree_init | ( | ion_dictionary_handler_t * | handler | ) |
Registers a specific handler for a dictionary instance.
Registers functions for handlers. This only needs to be called once for each type of dictionary that is present.
- Parameters
-
handler The handler for the dictionary instance that is to be initialized.
Definition at line 711 of file bpp_tree_handler.c.
ion_status_t(* insert)(ion_dictionary_t *, ion_key_t, ion_value_t)
Definition: dictionary_types.h:208
ion_err_t bpptree_close_dictionary(ion_dictionary_t *dictionary)
Closes a BppTree instance of a dictionary.
Definition: bpp_tree_handler.c:290
ion_status_t bpptree_update(ion_dictionary_t *dictionary, ion_key_t key, ion_value_t value)
Updates the value for a given key.
Definition: bpp_tree_handler.c:386
ion_status_t(* remove)(ion_dictionary_t *, ion_key_t)
Definition: dictionary_types.h:243
ion_err_t(* destroy_dictionary)(ion_dictionary_id_t id)
Definition: dictionary_types.h:252
ion_err_t bpptree_create_dictionary(ion_dictionary_id_t id, ion_key_type_t key_type, ion_key_size_t key_size, ion_value_size_t value_size, ion_dictionary_size_t dictionary_size, ion_dictionary_compare_t compare, ion_dictionary_handler_t *handler, ion_dictionary_t *dictionary)
Creates an instance of a dictionary.
Definition: bpp_tree_handler.c:73
ion_status_t bpptree_insert(ion_dictionary_t *dictionary, ion_key_t key, ion_value_t value)
Inserts a key and value into the dictionary.
Definition: bpp_tree_handler.c:152
ion_err_t bpptree_find(ion_dictionary_t *dictionary, ion_predicate_t *predicate, ion_dict_cursor_t **cursor)
Finds multiple instances of a keys that satisfy the provided predicate in the dictionary.
Definition: bpp_tree_handler.c:544
ion_err_t bpptree_destroy_dictionary(ion_dictionary_id_t id)
Deletes a closed instance of the dictionary and associated data.
Definition: bpp_tree_handler.c:352
ion_status_t bpptree_get(ion_dictionary_t *dictionary, ion_key_t key, ion_value_t value)
Queries a dictionary instance for the given key and returns the associated value. ...
Definition: bpp_tree_handler.c:217
ion_status_t(* update)(ion_dictionary_t *, ion_key_t, ion_value_t)
Definition: dictionary_types.h:231
ion_err_t(* close_dictionary)(ion_dictionary_t *)
Definition: dictionary_types.h:263
ion_err_t(* open_dictionary)(ion_dictionary_handler_t *, ion_dictionary_t *, ion_dictionary_config_info_t *, ion_dictionary_compare_t)
Definition: dictionary_types.h:256
ion_err_t(* create_dictionary)(ion_dictionary_id_t, ion_key_type_t, ion_key_size_t, ion_value_size_t, ion_dictionary_size_t, ion_dictionary_compare_t, ion_dictionary_handler_t *, ion_dictionary_t *)
Definition: dictionary_types.h:214
ion_status_t bpptree_delete(ion_dictionary_t *dictionary, ion_key_t key)
Deletes the key and associated value from the dictionary instance.
Definition: bpp_tree_handler.c:256
ion_err_t(* delete_dictionary)(ion_dictionary_t *)
Definition: dictionary_types.h:248
ion_err_t(* find)(ion_dictionary_t *, ion_predicate_t *, ion_dict_cursor_t **)
Definition: dictionary_types.h:237
ion_err_t bpptree_delete_dictionary(ion_dictionary_t *dictionary)
Deletes an instance of the dictionary and associated data.
Definition: bpp_tree_handler.c:317
ion_err_t bpptree_open_dictionary(ion_dictionary_handler_t *handler, ion_dictionary_t *dictionary, ion_dictionary_config_info_t *config, ion_dictionary_compare_t compare)
Opens a specific BppTree instance of a dictionary.
Definition: bpp_tree_handler.c:701
ion_status_t(* get)(ion_dictionary_t *, ion_key_t, ion_value_t)
Definition: dictionary_types.h:225
Here is the call graph for this function:
Here is the caller graph for this function: