示例#1
0
文件: hash.c 项目: bradfordw/prophet
void * OCI_API OCI_HashGetPointer
(
    OCI_HashTable *table,
    const mtext   *key
)
{
    OCI_HashValue *v = NULL;
    void *value      = NULL;

    OCI_CHECK_PTR(OCI_IPC_HASHTABLE, table, NULL);
    OCI_CHECK(table->type != OCI_HASH_POINTER, NULL);

    v = OCI_HashGetValue(table, key);

    if (v != NULL)
    {
        value = v->value.p_void;
    }

    OCI_RESULT(v != NULL);

    return value;
}
示例#2
0
文件: hash.c 项目: bradfordw/prophet
int OCI_API OCI_HashGetInt
(
    OCI_HashTable *table,
    const mtext   *key
)
{
    OCI_HashValue *v = NULL;
    int value        = 0;

    OCI_CHECK_PTR(OCI_IPC_HASHTABLE, table, 0);
    OCI_CHECK(table->type != OCI_HASH_INTEGER, 0);

    v = OCI_HashGetValue(table, key);

    if (v != NULL)
    {
        value = v->value.num;
    }

    OCI_RESULT(v != NULL);

    return value;
}
示例#3
0
文件: hash.c 项目: bradfordw/prophet
const mtext * OCI_API OCI_HashGetString
(
    OCI_HashTable *table,
    const mtext   *key
)
{
    OCI_HashValue *v   = NULL;
    const mtext *value = NULL;

    OCI_CHECK_PTR(OCI_IPC_HASHTABLE, table, NULL);
    OCI_CHECK(table->type != OCI_HASH_STRING, NULL);

    v = OCI_HashGetValue(table, key);

    if (v != NULL)
    {
        value = v->value.p_mtext;
    }

    OCI_RESULT(v != NULL);

    return value;
}
示例#4
0
文件: hash.c 项目: bookiant/ocilib
void * OCI_API OCI_HashGetPointer
(
    OCI_HashTable *table,
    const otext   *key
)
{
    OCI_HashValue *v = NULL;

    OCI_LIB_CALL_ENTER(void *, NULL)

    OCI_CHECK_PTR(OCI_IPC_HASHTABLE, table)
    OCI_CHECK_COMPAT(NULL, table->type == OCI_HASH_POINTER)

    v = OCI_HashGetValue(table, key);

    if (v)
    {
        call_retval = v->value.p_void;
    }

    call_status = TRUE;

    OCI_LIB_CALL_EXIT()
}
示例#5
0
文件: hash.c 项目: bookiant/ocilib
int OCI_API OCI_HashGetInt
(
    OCI_HashTable *table,
    const otext   *key
)
{
    OCI_HashValue *v = NULL;

    OCI_LIB_CALL_ENTER(int, 0)

    OCI_CHECK_PTR(OCI_IPC_HASHTABLE, table)
    OCI_CHECK_COMPAT(NULL, table->type == OCI_HASH_INTEGER)

    v = OCI_HashGetValue(table, key);

    if (v)
    {
        call_retval = v->value.num;
    }

    call_status = TRUE;

    OCI_LIB_CALL_EXIT()
}
示例#6
0
文件: hash.c 项目: bookiant/ocilib
const otext * OCI_API OCI_HashGetString
(
    OCI_HashTable *table,
    const otext   *key
)
{
    OCI_HashValue *v = NULL;

    OCI_LIB_CALL_ENTER(const otext *, NULL)

    OCI_CHECK_PTR(OCI_IPC_HASHTABLE, table)
    OCI_CHECK_COMPAT(NULL, table->type == OCI_HASH_STRING)

    v = OCI_HashGetValue(table, key);

    if (v)
    {
        call_retval = v->value.p_text;     
    }

    call_status = TRUE;

    OCI_LIB_CALL_EXIT()
}