flat_file_dictionary_handler.h
Go to the documentation of this file.
1 /******************************************************************************/
39 /******************************************************************************/
40 
41 #if !defined(FLAT_FILE_DICTIONARY_HANDLER_H_)
42 #define FLAT_FILE_DICTIONARY_HANDLER_H_
43 
44 #if defined(__cplusplus)
45 extern "C" {
46 #endif
47 
48 #include "flat_file_types.h"
49 #include "flat_file.h"
50 
57 void
60 );
61 
75  ion_key_t key,
76  ion_value_t value
77 );
78 
98  ion_key_t key,
99  ion_value_t value
100 );
101 
126 ion_err_t
129  ion_key_type_t key_type,
130  ion_key_size_t key_size,
131  ion_value_size_t value_size,
132  ion_dictionary_size_t dictionary_size,
133  ion_dictionary_compare_t compare,
134  ion_dictionary_handler_t *handler,
136 );
137 
149  ion_key_t key
150 );
151 
158 ion_err_t
161 );
162 
170 ion_err_t
173 );
174 
190  ion_key_t key,
191  ion_value_t value
192 );
193 
194 #if defined(__cplusplus)
195 }
196 #endif
197 
198 #endif
ion_status_t ffdict_update(ion_dictionary_t *dictionary, ion_key_t key, ion_value_t value)
Updates all records stored at key to have value equal to value.
enum ION_KEY_TYPE ion_key_type_t
This is the available key types for ION_DB. All types will be based on system defines.
ion_err_t ffdict_delete_dictionary(ion_dictionary_t *dictionary)
Cleans up all files created by the dictionary, and frees any allocated memory.
int ion_value_size_t
The size (length) of a dictionary value in bytes.
Definition: kv_system.h:256
ion_status_t ffdict_delete(ion_dictionary_t *dictionary, ion_key_t key)
Removes all instances of any record with key equal to key.
unsigned int ion_dictionary_id_t
A type used to identify dictionaries, specifically in the master table.
unsigned int ion_dictionary_size_t
The implementation specific size of the dictionary.
Definition: kv_system.h:264
ion_err_t ffdict_destroy_dictionary(ion_dictionary_id_t id)
Cleans up all files created by the dictionary, and frees any allocated memory, for an already closed ...
#define key(k)
Definition: bpp_tree.c:75
char(* ion_dictionary_compare_t)(ion_key_t, ion_key_t, ion_key_size_t)
Function pointer type for dictionary comparison methods.
char ion_err_t
The error type used to store error codes.
Definition: kv_system.h:226
void * ion_key_t
A dictionary key.
Definition: kv_system.h:241
void ffdict_init(ion_dictionary_handler_t *handler)
Given the handler instance, bind the appropriate flat file functions.
void * ion_value_t
A dictionary value.
Definition: kv_system.h:246
A dictionary contains information regarding an instance of the storage element and the associated han...
ion_status_t ffdict_get(ion_dictionary_t *dictionary, ion_key_t key, ion_value_t value)
Performs a "get" operation on the dictionary to retrieve a single record.
Implementation specific type definitions for the flat file store.
Implementation specific declarations for the flat file store.
ion_status_t ffdict_insert(ion_dictionary_t *dictionary, ion_key_t key, ion_value_t value)
Given a record ( key, value ), insert it into the dictionary.
int ion_key_size_t
The size (length) of a dictionary key in bytes.
Definition: kv_system.h:251
A dictionary_handler is responsible for dealing with the specific interface for an underlying diction...
A status object that describes the result of a dictionary operation.
Definition: kv_system.h:290
ion_err_t ffdict_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 flat file backed dictionary.