bpp_tree_handler.h File Reference

Description

The handler for a disk-backed B+ Tree.

Author
Graeme Douglas
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
handlerThe handler for the dictionary instance that is to be initialized.

Definition at line 711 of file bpp_tree_handler.c.

713  {
714  handler->insert = bpptree_insert;
716  handler->get = bpptree_get;
717  handler->update = bpptree_update;
718  handler->find = bpptree_find;
719  handler->remove = bpptree_delete;
724 }
ion_status_t(* insert)(ion_dictionary_t *, ion_key_t, ion_value_t)
ion_err_t bpptree_close_dictionary(ion_dictionary_t *dictionary)
Closes a BppTree instance of a dictionary.
ion_status_t bpptree_update(ion_dictionary_t *dictionary, ion_key_t key, ion_value_t value)
Updates the value for a given key.
ion_status_t(* remove)(ion_dictionary_t *, ion_key_t)
ion_err_t(* destroy_dictionary)(ion_dictionary_id_t id)
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.
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.
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.
ion_err_t bpptree_destroy_dictionary(ion_dictionary_id_t id)
Deletes a closed instance of the dictionary and associated data.
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. ...
ion_status_t(* update)(ion_dictionary_t *, ion_key_t, ion_value_t)
ion_err_t(* close_dictionary)(ion_dictionary_t *)
ion_err_t(* open_dictionary)(ion_dictionary_handler_t *, ion_dictionary_t *, ion_dictionary_config_info_t *, ion_dictionary_compare_t)
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 *)
ion_status_t bpptree_delete(ion_dictionary_t *dictionary, ion_key_t key)
Deletes the key and associated value from the dictionary instance.
ion_err_t(* delete_dictionary)(ion_dictionary_t *)
ion_err_t(* find)(ion_dictionary_t *, ion_predicate_t *, ion_dict_cursor_t **)
ion_err_t bpptree_delete_dictionary(ion_dictionary_t *dictionary)
Deletes an instance of the dictionary and associated data.
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.
ion_status_t(* get)(ion_dictionary_t *, ion_key_t, ion_value_t)

Here is the call graph for this function:

Here is the caller graph for this function: