CUBRID Engine
latest
|
#include "config.h"
#include <assert.h>
#include <stdlib.h>
#include "dbi.h"
#include "db_stub.h"
#include "api_util.h"
Go to the source code of this file.
Classes | |
struct | object_rm_bind_s |
struct | object_res_bind_s |
struct | object_resultset_s_ |
struct | object_resultset_pool_s |
Typedefs | |
typedef struct object_rm_bind_s | OBJECT_RM_BIND |
typedef struct object_res_bind_s | OBJECT_RES_BIND |
typedef struct object_resultset_s_ | OBJECT_RESULTSET |
typedef struct object_resultset_pool_s | OBJECT_RESULTSET_POOL |
Functions | |
static int | rm_api_get_count (API_RESULTSET_META *impl, int *count) |
static int | rm_api_get_info (API_RESULTSET_META *impl, int index, CI_RMETA_INFO_TYPE type, void *arg, size_t size) |
static void | or_rm_bind_destroyf (BH_BIND *bind) |
static int | or_rm_bind_create (OBJECT_RESULTSET *or, OBJECT_RM_BIND **rrm_bind) |
static void | or_rm_bind_destroy (OBJECT_RM_BIND *rm_bind) |
static int | res_api_get_resultset_metadata (API_RESULTSET *impl, API_RESULTSET_META **rimpl) |
static int | res_api_fetch (API_RESULTSET *impl, int offset, CI_FETCH_POSITION pos) |
static int | res_api_tell (API_RESULTSET *impl, int *offset) |
static int | res_api_clear_updates (API_RESULTSET *impl) |
static int | res_api_delete_row (API_RESULTSET *impl) |
static int | res_api_get_value (API_RESULTSET *impl, int index, CI_TYPE type, void *addr, size_t len, size_t *outlen, bool *is_null) |
static int | res_api_get_value_by_name (API_RESULTSET *impl, const char *name, CI_TYPE type, void *addr, size_t len, size_t *outlen, bool *isnull) |
static int | res_api_update_value (API_RESULTSET *impl, int index, CI_TYPE type, void *addr, size_t len) |
static int | res_api_apply_update (API_RESULTSET *impl) |
static void | res_api_destroy (API_RESULTSET *impl) |
static void | or_res_bind_destroyf (BH_BIND *bind) |
static int | or_res_bind_create (OBJECT_RESULTSET *or, OBJECT_RES_BIND **rres_bind) |
static void | or_res_bind_destroy (OBJECT_RES_BIND *res_bind) |
static int | vt_api_get_index_by_name (void *impl, const char *name, int *ri) |
static int | vt_api_get_db_value (void *impl, int index, DB_VALUE *dbval) |
static int | vt_api_set_db_value (void *impl, int index, DB_VALUE *dbval) |
static int | vt_api_init_domain (void *impl, int index, DB_VALUE *value) |
static void | or_destroy (OBJECT_RESULTSET *or) |
static int | or_create (OID *oid, BIND_HANDLE conn, BH_INTERFACE *bh_ifs, OBJECT_RESULTSET **ror) |
static int | orp_ht_comparef (void *key1, void *key2, int *r) |
static int | orp_ht_hashf (void *key, unsigned int *rv) |
static int | orp_ht_keyf (void *elem, void **rk) |
static int | orp_api_get_object_resultset (API_OBJECT_RESULTSET_POOL *pool, CI_OID *oid, API_RESULTSET **rref) |
static int | orp_oid_delete (API_OBJECT_RESULTSET_POOL *pool, CI_OID *oid) |
static int | orp_oid_get_classname (API_OBJECT_RESULTSET_POOL *pool, CI_OID *xoid, char *name, size_t size) |
static void | orp_api_destroy (API_OBJECT_RESULTSET_POOL *pool) |
static int | apif_tell (DB_OBJECT *obj, int *pos) |
static int | apif_last_pos (DB_OBJECT *obj, int *pos) |
int | api_object_resultset_pool_create (BH_INTERFACE *ifs, BIND_HANDLE conn, API_OBJECT_RESULTSET_POOL **rpool) |
Variables | |
static API_RESULTSET_META_IFS | RM_IFS_ |
static API_RESULTSET_IFS | RES_IFS_ |
typedef struct object_res_bind_s OBJECT_RES_BIND |
Definition at line 31 of file db_object.c.
typedef struct object_resultset_s_ OBJECT_RESULTSET |
Definition at line 32 of file db_object.c.
typedef struct object_resultset_pool_s OBJECT_RESULTSET_POOL |
Definition at line 33 of file db_object.c.
typedef struct object_rm_bind_s OBJECT_RM_BIND |
Definition at line 30 of file db_object.c.
int api_object_resultset_pool_create | ( | BH_INTERFACE * | ifs, |
BIND_HANDLE | conn, | ||
API_OBJECT_RESULTSET_POOL ** | rpool | ||
) |
Definition at line 1159 of file db_object.c.
References API_FREE, API_MALLOC, assert, object_resultset_pool_s::bh_ifs, object_resultset_pool_s::conn, api_object_resultset_pool_s::destroy, ER_INTERFACE_NO_MORE_MEMORY, api_object_resultset_pool_s::get_object_resultset, hash_new(), object_resultset_pool_s::ht, NO_ERROR, NULL, api_object_resultset_pool_s::oid_delete, api_object_resultset_pool_s::oid_get_classname, orp_api_destroy(), orp_api_get_object_resultset(), orp_ht_comparef(), orp_ht_hashf(), orp_ht_keyf(), orp_oid_delete(), orp_oid_get_classname(), and object_resultset_pool_s::pool.
Referenced by ci_create_connection_impl().
|
static |
Definition at line 1129 of file db_object.c.
References assert, db_get_int(), db_send(), NO_ERROR, and NULL.
|
static |
Definition at line 1104 of file db_object.c.
References assert, db_get_int(), db_send(), NO_ERROR, and NULL.
|
static |
Definition at line 794 of file db_object.c.
References bh_interface_s::alloc_handle, API_CALLOC, API_FREE, assert, object_resultset_s_::attr_index, object_resultset_s_::attrs, object_resultset_s_::bh_ifs, bh_interface_s::bind_graft, object_resultset_s_::clz, object_resultset_s_::conn, create_db_value_bind_table(), db_attribute_next(), db_get_attributes(), db_get_class(), db_object(), object_resultset_s_::deleted, bh_interface_s::destroy_handle, ER_INTERFACE_GENERIC, ER_INTERFACE_NO_MORE_MEMORY, i, object_resultset_s_::nattrs, NO_ERROR, NULL, object_resultset_s_::obj, object_resultset_s_::oid, object_rm_bind_s::or, or_destroy(), or_res_bind_create(), or_res_bind_destroy(), or_rm_bind_create(), or_rm_bind_destroy(), object_resultset_s_::res_bind, object_resultset_s_::rm_bind, object_resultset_s_::vt, vt_api_get_db_value(), vt_api_get_index_by_name(), vt_api_init_domain(), and vt_api_set_db_value().
Referenced by orp_api_get_object_resultset().
|
static |
Definition at line 760 of file db_object.c.
References API_FREE, assert, object_resultset_s_::attr_index, object_resultset_s_::bh_ifs, bh_interface_s::bind_to_handle, value_bind_table_ifs_s::destroy, bh_interface_s::destroy_handle, value_bind_table_s::ifs, NO_ERROR, NULL, object_resultset_s_::res_bind, object_resultset_s_::rm_bind, and object_resultset_s_::vt.
Referenced by or_create(), and res_api_destroy().
|
static |
Definition at line 621 of file db_object.c.
References API_MALLOC, assert, ER_INTERFACE_NO_MORE_MEMORY, HANDLE_TYPE_RESULTSET, NO_ERROR, NULL, object_rm_bind_s::or, object_res_bind_s::or, or_res_bind_destroyf(), object_res_bind_s::res, and RES_IFS_.
Referenced by or_create().
|
static |
Definition at line 644 of file db_object.c.
References API_FREE, assert, and NULL.
Referenced by or_create(), and or_res_bind_destroyf().
|
static |
Definition at line 604 of file db_object.c.
References assert, NULL, object_res_bind_s::or, or_res_bind_destroy(), and object_resultset_s_::res_bind.
Referenced by or_res_bind_create().
|
static |
Definition at line 326 of file db_object.c.
References API_MALLOC, assert, ER_INTERFACE_NO_MORE_MEMORY, HANDLE_TYPE_RMETA, NO_ERROR, NULL, object_rm_bind_s::or, or_rm_bind_destroyf(), object_rm_bind_s::rm, and RM_IFS_.
Referenced by or_create().
|
static |
Definition at line 348 of file db_object.c.
References API_FREE, assert, and NULL.
Referenced by or_create(), and or_rm_bind_destroyf().
|
static |
Definition at line 310 of file db_object.c.
References assert, NULL, object_rm_bind_s::or, or_rm_bind_destroy(), and object_resultset_s_::rm_bind.
Referenced by or_rm_bind_create().
|
static |
Definition at line 1088 of file db_object.c.
References API_FREE, assert, hash_destroy(), object_resultset_pool_s::ht, NULL, and p.
Referenced by api_object_resultset_pool_create().
|
static |
Definition at line 974 of file db_object.c.
References assert, object_resultset_pool_s::bh_ifs, object_resultset_pool_s::conn, hash_lookup(), object_resultset_pool_s::ht, NO_ERROR, NULL, object_rm_bind_s::or, or_create(), p, object_resultset_s_::res_bind, and xoid2oid().
Referenced by api_object_resultset_pool_create().
|
static |
Definition at line 922 of file db_object.c.
References assert, NO_ERROR, NULL, OID_EQ, and OID_GT.
Referenced by api_object_resultset_pool_create().
|
static |
Definition at line 940 of file db_object.c.
References assert, NO_ERROR, NULL, and OID_PSEUDO_KEY.
Referenced by api_object_resultset_pool_create().
|
static |
Definition at line 957 of file db_object.c.
References assert, NO_ERROR, NULL, object_resultset_s_::oid, and object_rm_bind_s::or.
Referenced by api_object_resultset_pool_create().
|
static |
Definition at line 1011 of file db_object.c.
References assert, db_drop(), ER_INTERFACE_INVALID_HANDLE, hash_lookup(), object_resultset_pool_s::ht, NO_ERROR, NULL, object_resultset_s_::obj, object_rm_bind_s::or, p, object_res_bind_s::res, object_resultset_s_::res_bind, and xoid2oid().
Referenced by api_object_resultset_pool_create().
|
static |
Definition at line 1048 of file db_object.c.
References assert, db_get_class_name(), hash_lookup(), object_resultset_pool_s::ht, NO_ERROR, NULL, p, ws_mop(), and xoid2oid().
Referenced by api_object_resultset_pool_create().
|
static |
Definition at line 558 of file db_object.c.
References value_bind_table_ifs_s::apply_updates, assert, object_resultset_s_::deleted, ER_INTERFACE_GENERIC, value_bind_table_s::ifs, NULL, object_rm_bind_s::or, and object_resultset_s_::vt.
|
static |
Definition at line 425 of file db_object.c.
References assert, object_resultset_s_::deleted, ER_INTERFACE_GENERIC, value_bind_table_s::ifs, NULL, object_rm_bind_s::or, value_bind_table_ifs_s::reset, and object_resultset_s_::vt.
|
static |
Definition at line 445 of file db_object.c.
References assert, db_drop(), object_resultset_s_::deleted, value_bind_table_ifs_s::destroy, ER_INTERFACE_GENERIC, value_bind_table_s::ifs, NO_ERROR, NULL, object_resultset_s_::obj, object_rm_bind_s::or, and object_resultset_s_::vt.
|
static |
Definition at line 577 of file db_object.c.
References assert, NULL, object_rm_bind_s::or, and or_destroy().
|
static |
Definition at line 382 of file db_object.c.
References assert, object_resultset_s_::deleted, ER_INTERFACE_GENERIC, ER_INTERFACE_INVALID_ARGUMENT, object_resultset_s_::nattrs, NO_ERROR, NULL, and object_rm_bind_s::or.
|
static |
Definition at line 364 of file db_object.c.
References assert, NO_ERROR, NULL, object_rm_bind_s::or, and object_resultset_s_::rm_bind.
|
static |
Definition at line 475 of file db_object.c.
References assert, object_resultset_s_::deleted, ER_INTERFACE_GENERIC, ER_INTERFACE_INVALID_ARGUMENT, value_bind_table_ifs_s::get_value, value_bind_table_s::ifs, object_resultset_s_::nattrs, NULL, object_rm_bind_s::or, and object_resultset_s_::vt.
|
static |
Definition at line 507 of file db_object.c.
References assert, object_resultset_s_::deleted, ER_INTERFACE_GENERIC, ER_INTERFACE_INVALID_ARGUMENT, value_bind_table_ifs_s::get_value_by_name, value_bind_table_s::ifs, NULL, object_rm_bind_s::or, and object_resultset_s_::vt.
|
static |
Definition at line 409 of file db_object.c.
References assert, NO_ERROR, NULL, and object_rm_bind_s::or.
|
static |
Definition at line 533 of file db_object.c.
References assert, object_resultset_s_::deleted, ER_INTERFACE_GENERIC, ER_INTERFACE_INVALID_ARGUMENT, value_bind_table_s::ifs, object_resultset_s_::nattrs, NULL, object_rm_bind_s::or, value_bind_table_ifs_s::set_value, and object_resultset_s_::vt.
|
static |
Definition at line 121 of file db_object.c.
References assert, object_resultset_s_::nattrs, NO_ERROR, NULL, and object_rm_bind_s::or.
|
static |
Definition at line 142 of file db_object.c.
References assert, object_resultset_s_::attr_index, object_resultset_s_::clz, db_attribute_domain(), db_attribute_is_auto_increment(), db_attribute_is_non_null(), db_attribute_name(), db_domain_precision(), db_domain_scale(), db_get_class_name(), db_type_to_type(), ER_INTERFACE_GENERIC, ER_INTERFACE_INVALID_ARGUMENT, db_object::lock, object_resultset_s_::nattrs, NO_ERROR, NULL, object_resultset_s_::obj, object_rm_bind_s::or, strlen, TP_DOMAIN_TYPE, U_LOCK, and X_LOCK.
|
static |
Definition at line 684 of file db_object.c.
References assert, object_resultset_s_::attr_index, db_get(), ER_INTERFACE_GENERIC, sm_attribute::header, sm_component::name, NO_ERROR, NULL, object_resultset_s_::obj, and object_rm_bind_s::or.
Referenced by or_create().
|
static |
Definition at line 658 of file db_object.c.
References assert, object_resultset_s_::attr_index, db_attribute_name(), ER_INTERFACE_GENERIC, i, object_resultset_s_::nattrs, NO_ERROR, NULL, and object_rm_bind_s::or.
Referenced by or_create().
|
static |
Definition at line 734 of file db_object.c.
References assert, object_resultset_s_::attr_index, db_attribute_domain(), db_domain_precision(), db_domain_scale(), db_value_domain_init(), NO_ERROR, NULL, object_rm_bind_s::or, p, and TP_DOMAIN_TYPE.
Referenced by or_create().
|
static |
Definition at line 706 of file db_object.c.
References assert, object_resultset_s_::attr_index, db_put(), ER_INTERFACE_GENERIC, sm_attribute::header, sm_component::name, NO_ERROR, NULL, object_resultset_s_::obj, and object_rm_bind_s::or.
Referenced by or_create().
|
static |
Definition at line 585 of file db_object.c.
Referenced by or_res_bind_create().
|
static |
Definition at line 299 of file db_object.c.
Referenced by or_rm_bind_create().