OCILIB (C and C++ Driver for Oracle)
4.7.5
Open source and cross platform Oracle Driver delivering efficient access to Oracle databases.
|
OcilibCApiFormatting
OCILIB uses hash tables internally for index/name columns mapping.
OCILIB makes public its hash table’s implementation public for general purpose uses.
OCI_HashTable objects manage string keys / values that can be :
This hash table implementation :
Functions | |
OCI_SYM_PUBLIC OCI_HashTable *OCI_API | OCI_HashCreate (unsigned int size, unsigned int type) |
Create a hash table. | |
OCI_SYM_PUBLIC boolean OCI_API | OCI_HashFree (OCI_HashTable *table) |
Destroy a hash table. | |
OCI_SYM_PUBLIC unsigned int OCI_API | OCI_HashGetSize (OCI_HashTable *table) |
Return the size of the hash table. | |
OCI_SYM_PUBLIC unsigned int OCI_API | OCI_HashGetType (OCI_HashTable *table) |
Return the type of the hash table. | |
OCI_SYM_PUBLIC boolean OCI_API | OCI_HashAddString (OCI_HashTable *table, const otext *key, const otext *value) |
Add a pair string key / string value to the hash table. | |
OCI_SYM_PUBLIC const otext *OCI_API | OCI_HashGetString (OCI_HashTable *table, const otext *key) |
Return the string value associated to the given key. | |
OCI_SYM_PUBLIC boolean OCI_API | OCI_HashAddInt (OCI_HashTable *table, const otext *key, int value) |
Adds a pair string key / integer value to the hash table. | |
OCI_SYM_PUBLIC int OCI_API | OCI_HashGetInt (OCI_HashTable *table, const otext *key) |
Return the integer value associated to the given key. | |
OCI_SYM_PUBLIC boolean OCI_API | OCI_HashAddPointer (OCI_HashTable *table, const otext *key, void *value) |
Adds a pair string key / pointer value to the hash table. | |
OCI_SYM_PUBLIC void *OCI_API | OCI_HashGetPointer (OCI_HashTable *table, const otext *key) |
Return a pointer associated with the given key. | |
OCI_SYM_PUBLIC OCI_HashEntry *OCI_API | OCI_HashLookup (OCI_HashTable *table, const otext *key, boolean create) |
Lookup for an entry matching the key in the table. | |
OCI_SYM_PUBLIC OCI_HashValue *OCI_API | OCI_HashGetValue (OCI_HashTable *table, const otext *key) |
Return the first hash slot that matches the key. | |
OCI_SYM_PUBLIC OCI_HashEntry *OCI_API | OCI_HashGetEntry (OCI_HashTable *table, unsigned int index) |
Return the entry slot of the hash table internal list at the given position. | |
OCI_SYM_PUBLIC OCI_HashTable *OCI_API OCI_HashCreate | ( | unsigned int | size, |
unsigned int | type | ||
) |
#include <api.h>
Create a hash table.
size | - size of the hash table |
type | - type of the hash table |
OCI_SYM_PUBLIC boolean OCI_API OCI_HashFree | ( | OCI_HashTable * | table | ) |
#include <api.h>
Destroy a hash table.
table | - Table handle |
OCI_SYM_PUBLIC unsigned int OCI_API OCI_HashGetSize | ( | OCI_HashTable * | table | ) |
#include <api.h>
Return the size of the hash table.
table | - Table handle |
OCI_SYM_PUBLIC unsigned int OCI_API OCI_HashGetType | ( | OCI_HashTable * | table | ) |
#include <api.h>
Return the type of the hash table.
table | - Table handle |
OCI_SYM_PUBLIC boolean OCI_API OCI_HashAddString | ( | OCI_HashTable * | table, |
const otext * | key, | ||
const otext * | value | ||
) |
#include <api.h>
Add a pair string key / string value to the hash table.
table | - Table handle |
key | - String key |
value | - string value |
OCI_SYM_PUBLIC const otext *OCI_API OCI_HashGetString | ( | OCI_HashTable * | table, |
const otext * | key | ||
) |
#include <api.h>
Return the string value associated to the given key.
table | - Table handle |
key | - String key |
OCI_SYM_PUBLIC boolean OCI_API OCI_HashAddInt | ( | OCI_HashTable * | table, |
const otext * | key, | ||
int | value | ||
) |
#include <api.h>
Adds a pair string key / integer value to the hash table.
table | - Table handle |
key | - String key |
value | - Integer value |
OCI_SYM_PUBLIC int OCI_API OCI_HashGetInt | ( | OCI_HashTable * | table, |
const otext * | key | ||
) |
#include <api.h>
Return the integer value associated to the given key.
table | - Table handle |
key | - String key |
OCI_SYM_PUBLIC boolean OCI_API OCI_HashAddPointer | ( | OCI_HashTable * | table, |
const otext * | key, | ||
void * | value | ||
) |
#include <api.h>
Adds a pair string key / pointer value to the hash table.
table | - Table handle |
key | - String key |
value | - Pointer value |
OCI_SYM_PUBLIC void *OCI_API OCI_HashGetPointer | ( | OCI_HashTable * | table, |
const otext * | key | ||
) |
#include <api.h>
Return a pointer associated with the given key.
table | - Table handle |
key | - String key |
OCI_SYM_PUBLIC OCI_HashEntry *OCI_API OCI_HashLookup | ( | OCI_HashTable * | table, |
const otext * | key, | ||
boolean | create | ||
) |
#include <api.h>
Lookup for an entry matching the key in the table.
table | - Table handle |
key | - String key |
create | - Do create the entry if not exists |
OCI_SYM_PUBLIC OCI_HashValue *OCI_API OCI_HashGetValue | ( | OCI_HashTable * | table, |
const otext * | key | ||
) |
#include <api.h>
Return the first hash slot that matches the key.
table | - Table handle |
key | - String key |
OCI_SYM_PUBLIC OCI_HashEntry *OCI_API OCI_HashGetEntry | ( | OCI_HashTable * | table, |
unsigned int | index | ||
) |
#include <api.h>
Return the entry slot of the hash table internal list at the given position.
table | - Table handle |
index | - index |