CUBRID Engine  latest
cci_stub.c File Reference
#include "config.h"
#include <string.h>
#include <assert.h>
#include <stdio.h>
#include <stdlib.h>
#include "api_util.h"
#include "api_common.h"
#include "cas_cci.h"
Include dependency graph for cci_stub.c:

Go to the source code of this file.

Classes

struct  connection_impl_s
 
struct  parameter_meta_impl_s
 
struct  batch_result_impl_s
 
struct  batch_sql_item_s
 
struct  batch_ary_item_s
 
struct  statement_impl_s
 
struct  resultset_meta_impl_s
 
struct  resultset_impl_s
 
struct  api_val_s
 
struct  api_val_cci_bind_s
 
struct  cci_object_s
 
struct  cci_object_pool_s
 
struct  cci_collection_s
 
struct  add_batch_params_arg
 
struct  ores_nvt_s
 
struct  ores_apply_updatef_s
 

Macros

#define DBDEF_HEADER_
 
#define API_VAL_CCI_BIND_FLAG_GET   0x01
 
#define API_VAL_CCI_BIND_FLAG_SET   0x02
 
#define API_EXEC_PRE()
 
#define API_EXEC_POST(has_result)
 

Typedefs

typedef enum impl_handle_type IMPL_HANDLE_TYPE
 
typedef struct connection_impl_s CONNECTION_IMPL
 
typedef struct parameter_meta_impl_s PARAMETER_META_IMPL
 
typedef struct batch_sql_item_s BATCH_SQL_ITEM
 
typedef struct batch_ary_item_s BATCH_ARY_ITEM
 
typedef struct batch_result_impl_s BATCH_RESULT_IMPL
 
typedef struct statement_impl_s STATEMENT_IMPL
 
typedef struct resultset_meta_impl_s RESULTSET_META_IMPL
 
typedef struct resultset_impl_s RESULTSET_IMPL
 
typedef struct api_val_s API_VAL
 
typedef struct api_val_cci_bind_s API_VAL_CCI_BIND
 
typedef struct cci_object_s CCI_OBJECT
 
typedef struct cci_object_pool_s CCI_OBJECT_POOL
 
typedef struct cci_collection_s CCI_COLLECTION
 

Functions

static int bind_api_structure (BH_INTERFACE *bh, COMMON_API_STRUCTURE *s, COMMON_API_STRUCTURE *parent, BIND_HANDLE *handle)
 
static int err_from_cci (int err)
 
static void connection_impl_dtor (BH_BIND *bind)
 
static void init_connection_impl (CONNECTION_IMPL *impl, int rid, CI_CONNECTION conn, BH_INTERFACE *bh, int conn_handle, CCI_OBJECT_POOL *pool)
 
static int complete_connection (CONNECTION_IMPL *impl)
 
static void api_val_dtor (VALUE_AREA *va, API_VALUE *val)
 
static CI_TYPE cci_u_type_to_type (T_CCI_U_TYPE utype)
 
static T_CCI_U_TYPE type_to_cci_u_type (CI_TYPE type)
 
static int get_value_from_api_val (const API_VAL *pv, CI_TYPE type, void *addr, size_t len, size_t *outlen, bool *isnull)
 
static int set_value_to_api_val (API_VAL *pv, CI_TYPE type, void *addr, size_t len)
 
static int get_type_value_size (CI_TYPE type, int *len)
 
static void api_val_cci_bind_init (API_VAL_CCI_BIND *bind, CI_CONNECTION conn, int flag)
 
static int api_val_cci_bind_bind (CI_TYPE type, void *ptr, int len, API_VAL_CCI_BIND *bind)
 
static void api_val_cci_bind_clear (API_VAL_CCI_BIND *bind)
 
static int api_val_bind_param (CI_CONNECTION conn, int req_handle, API_VAL *pv, int index)
 
static int get_value_from_req_handle (CI_CONNECTION conn, int req_handle, int index, CI_TYPE type, void *addr, size_t len, size_t *outlen, bool *is_null)
 
static int get_value_from_tset (T_CCI_U_TYPE utype, T_CCI_SET tset, CI_TYPE type, CI_CONNECTION conn, int i, API_VAL **pv)
 
static int api_val_cursor_update (CI_CONNECTION conn, int req_handle, int offset, int index, API_VAL *av, T_CCI_ERROR *err_buf)
 
static int lazy_bind_qres_rmeta (RESULTSET_IMPL *pres)
 
static int api_qres_get_resultset_metadata (API_RESULTSET *res, API_RESULTSET_META **rimpl)
 
static int api_qres_fetch (API_RESULTSET *res, int offset, CI_FETCH_POSITION pos)
 
static int api_qres_tell (API_RESULTSET *res, int *offset)
 
static int api_qres_clear_updates (API_RESULTSET *res)
 
static int api_qres_delete_row (API_RESULTSET *res)
 
static int api_qres_get_value (API_RESULTSET *res, int index, CI_TYPE type, void *addr, size_t len, size_t *outlen, bool *is_null)
 
static int api_qres_get_value_by_name (API_RESULTSET *res, const char *name, CI_TYPE type, void *addr, size_t len, size_t *outlen, bool *isnull)
 
static int api_qres_update_value (API_RESULTSET *res, int index, CI_TYPE type, void *addr, size_t len)
 
static int api_qres_apply_update (API_RESULTSET *res)
 
static void api_qres_destroy (API_RESULTSET *res)
 
static int create_resultset_impl (CI_CONNECTION conn, BH_INTERFACE *bh, int req_handle, T_CCI_ERROR *err_buf, COMMON_API_STRUCTURE *parent, bool updatable, void *arg, void(*on_close)(RESULTSET_IMPL *, void *), API_RESULTSET_IFS *resifs, API_RESULTSET_META_IFS *rmifs, RESULTSET_IMPL **rpres)
 
static void resultset_impl_dtor (BH_BIND *bind)
 
static int api_qrmeta_get_count (API_RESULTSET_META *rm, int *count)
 
static int api_qrmeta_get_info (API_RESULTSET_META *rm, int index, CI_RMETA_INFO_TYPE type, void *arg, size_t size)
 
static int lazy_bind_pstmt_pmeta (STATEMENT_IMPL *pstmt)
 
static void statement_impl_dtor (BH_BIND *bind)
 
static void init_statement_impl (STATEMENT_IMPL *pstmt, CONNECTION_IMPL *pconn)
 
static int statement_execute (STATEMENT_IMPL *pstmt, T_CCI_ERROR *err_buf)
 
static int statement_get_reshandle_or_affectedrows (BH_INTERFACE *bh, STATEMENT_IMPL *pstmt)
 
static int complete_statement (STATEMENT_IMPL *pstmt)
 
static void on_close_statement_res (RESULTSET_IMPL *impl, void *arg)
 
static int add_batch_params_restore_mapf (void *arg, int index, VALUE_AREA *va, API_VALUE *val)
 
static int add_batch_params_mapf (void *arg, int index, VALUE_AREA *va, API_VALUE *val)
 
static int stmt_execute_batch_sql (STATEMENT_IMPL *pstmt)
 
static int stmt_execute_batch_array (STATEMENT_IMPL *pstmt)
 
static int stmt_complete_batch (STATEMENT_IMPL *pstmt)
 
static int api_ormeta_get_count (API_RESULTSET_META *rm, int *count)
 
static int api_ormeta_get_info (API_RESULTSET_META *rm, int index, CI_RMETA_INFO_TYPE type, void *arg, size_t size)
 
static int api_ores_get_resultset_metadata (API_RESULTSET *res, API_RESULTSET_META **rimpl)
 
static int api_ores_fetch (API_RESULTSET *res, int offset, CI_FETCH_POSITION pos)
 
static int api_ores_tell (API_RESULTSET *res, int *offset)
 
static int api_ores_clear_updates (API_RESULTSET *res)
 
static int api_ores_delete_row (API_RESULTSET *res)
 
static int api_ores_get_value (API_RESULTSET *res, int index, CI_TYPE type, void *addr, size_t len, size_t *outlen, bool *is_null)
 
static int api_ores_get_value_by_name (API_RESULTSET *res, const char *name, CI_TYPE type, void *addr, size_t len, size_t *outlen, bool *isnull)
 
static int api_ores_update_value (API_RESULTSET *res, int index, CI_TYPE type, void *addr, size_t len)
 
static int api_ores_apply_update (API_RESULTSET *res)
 
static void api_ores_destroy (API_RESULTSET *res)
 
static int opool_get_object_resultset (API_OBJECT_RESULTSET_POOL *poo, CI_OID *oid, API_RESULTSET **rres)
 
static int opool_oid_delete (API_OBJECT_RESULTSET_POOL *poo, CI_OID *oid)
 
static int opool_oid_get_classname (API_OBJECT_RESULTSET_POOL *pool, CI_OID *oid, char *name, size_t size)
 
static void opool_destroy (API_OBJECT_RESULTSET_POOL *poo)
 
static int create_cci_object (CCI_OBJECT_POOL *pool, CI_OID *oid, CCI_OBJECT **cobj)
 
static void destroy_cci_object (CCI_OBJECT *obj)
 
static void on_close_opool_res (RESULTSET_IMPL *impl, void *arg)
 
static void xoid2oidstr (const CI_OID *xoid, char *oidbuf)
 
static int oidstr2xoid (const char *oidstr, CI_CONNECTION conn, CI_OID *xoid)
 
static int opool_ht_comparef (void *key1, void *key2, int *r)
 
static int opool_ht_hashf (void *key, unsigned int *rv)
 
static int opool_ht_keyf (void *elem, void **rk)
 
static void opool_ht_elem_dtor (void *elem)
 
static int opool_ght_keyf (void *elem, void **rk)
 
static void opool_ght_elem_dtor (void *elem)
 
static int opool_create (CONNECTION_IMPL *pconn, CCI_OBJECT_POOL **rpool)
 
static int api_col_length (API_COLLECTION *col, int *len)
 
static int api_col_insert (API_COLLECTION *col, long pos, CI_TYPE type, void *ptr, size_t size)
 
static int api_col_update (API_COLLECTION *col, long pos, CI_TYPE type, void *ptr, size_t size)
 
static int api_col_delete (API_COLLECTION *col, long pos)
 
static int api_col_get_elem_domain_info (API_COLLECTION *col, long pos, CI_TYPE *type, int *precision, int *scale)
 
static int api_col_get_elem (API_COLLECTION *col, long pos, CI_TYPE type, void *addr, size_t len, size_t *outlen, bool *isnull)
 
static void api_col_destroy (API_COLLECTION *col)
 
static void xcol_elem_dtor (VALUE_AREA *va, API_VALUE *av)
 
static int xcol_create (CI_TYPE type, CI_CONNECTION conn, CI_COLLECTION *rcol)
 
static void xcol_destroy (CI_COLLECTION col)
 
static int xcol_elem_cci_bind_mapf (void *arg, int index, VALUE_AREA *va, API_VALUE *av)
 
static int xcol_to_cci_set (CI_COLLECTION col, T_CCI_SET *tset)
 
static int cci_set_to_xcol (CI_CONNECTION conn, T_CCI_SET tset, CI_COLLECTION *col)
 
static int xcol_copy (CI_COLLECTION col, CI_COLLECTION *rcol)
 
static int qres_apply_updatef (void *arg, int index, VALUE_AREA *va, API_VALUE *v)
 
static int ores_apply_updatef (void *arg, int index, VALUE_AREA *va, API_VALUE *v)
 
static int ci_create_connection_impl (CI_CONNECTION *conn)
 
static int ci_err_set_impl (int err_code)
 
static int ci_conn_connect_impl (COMMON_API_STRUCTURE *conn, const char *host, unsigned short port, const char *databasename, const char *user_name, const char *password)
 
static int ci_conn_close_impl (COMMON_API_STRUCTURE *conn)
 
static int ci_conn_create_statement_impl (COMMON_API_STRUCTURE *conn, CI_STATEMENT *stmt)
 
static int ci_conn_set_option_impl (COMMON_API_STRUCTURE *conn, CI_CONNECTION_OPTION option, void *arg, size_t size)
 
static int ci_conn_get_option_impl (COMMON_API_STRUCTURE *conn, CI_CONNECTION_OPTION option, void *arg, size_t size)
 
static int ci_conn_commit_impl (COMMON_API_STRUCTURE *conn)
 
static int ci_conn_rollback_impl (COMMON_API_STRUCTURE *conn)
 
static int ci_conn_get_error_impl (COMMON_API_STRUCTURE *conn, int *err, char *msg, size_t size)
 
static int ci_stmt_add_batch_query_impl (COMMON_API_STRUCTURE *stmt, const char *sql, size_t len)
 
static int ci_stmt_add_batch_impl (COMMON_API_STRUCTURE *stmt)
 
static int ci_stmt_clear_batch_impl (COMMON_API_STRUCTURE *stmt)
 
static int ci_stmt_execute_immediate_impl (COMMON_API_STRUCTURE *stmt, char *sql, size_t len, CI_RESULTSET *rs, int *r)
 
static int ci_stmt_execute_impl (COMMON_API_STRUCTURE *stmt, CI_RESULTSET *rs, int *r)
 
static int ci_stmt_execute_batch_impl (COMMON_API_STRUCTURE *stmt, CI_BATCH_RESULT *br)
 
static int ci_stmt_get_option_impl (COMMON_API_STRUCTURE *stmt, CI_STATEMENT_OPTION option, void *arg, size_t size)
 
static int ci_stmt_set_option_impl (COMMON_API_STRUCTURE *stmt, CI_STATEMENT_OPTION option, void *arg, size_t size)
 
static int ci_stmt_prepare_impl (COMMON_API_STRUCTURE *stmt, const char *sql, size_t len)
 
static int ci_stmt_register_out_parameter_impl (COMMON_API_STRUCTURE *stmt, int index)
 
static int ci_stmt_get_resultset_metadata_impl (COMMON_API_STRUCTURE *stmt, CI_RESULTSET_METADATA *r)
 
static int ci_stmt_get_parameter_metadata_impl (COMMON_API_STRUCTURE *stmt, CI_PARAMETER_METADATA *r)
 
static int ci_stmt_get_parameter_impl (COMMON_API_STRUCTURE *stmt, int index, CI_TYPE type, void *addr, size_t len, size_t *outlen, bool *isnull)
 
static int ci_stmt_set_parameter_impl (COMMON_API_STRUCTURE *stmt, int index, CI_TYPE type, void *val, size_t size)
 
static int ci_stmt_get_resultset_impl (COMMON_API_STRUCTURE *stmt, CI_RESULTSET *r)
 
static int ci_stmt_affected_rows_impl (COMMON_API_STRUCTURE *stmt, int *out)
 
static int ci_stmt_next_result_impl (COMMON_API_STRUCTURE *stmt, bool *exist_result)
 
static int ci_stmt_get_first_error_impl (COMMON_API_STRUCTURE *stmt, int *line, int *col, int *errcode, char *err_msg, size_t size)
 
static int ci_stmt_get_next_error_impl (COMMON_API_STRUCTURE *stmt, int *line, int *col, int *errcode, char *err_msg, size_t size)
 
static int ci_stmt_get_query_type_impl (COMMON_API_STRUCTURE *stmt, CUBRID_STMT_TYPE *type)
 
static int ci_stmt_get_start_line_impl (COMMON_API_STRUCTURE *stmt, int *line)
 
static int ci_batch_res_query_count_impl (COMMON_API_STRUCTURE *br, int *count)
 
static int ci_batch_res_get_result_impl (COMMON_API_STRUCTURE *br, int index, int *ret, int *nr)
 
static int ci_batch_res_get_error_impl (COMMON_API_STRUCTURE *br, int index, int *err_code, char *err_msg, size_t buf_size)
 
static int ci_pmeta_get_count_impl (COMMON_API_STRUCTURE *pmeta, int *count)
 
static int ci_pmeta_get_info_impl (COMMON_API_STRUCTURE *pmeta, int index, CI_PMETA_INFO_TYPE type, void *arg, size_t size)
 
static int ci_get_connection_opool_impl (COMMON_API_STRUCTURE *pst, API_OBJECT_RESULTSET_POOL **rpool)
 
static int ci_collection_new_impl (CI_CONNECTION conn, CI_COLLECTION *coll)
 

Variables

static API_RESULTSET_IFS QRES_IFS_
 
static API_RESULTSET_META_IFS QRMETA_IFS_
 
static API_RESULTSET_META_IFS ORMETA_IFS_
 
static API_RESULTSET_IFS ORES_IFS_
 
static API_COLLECTION_IFS COL_IFS_
 
CUBRID_API_FUNCTION_TABLE Cubrid_api_function_table
 

Macro Definition Documentation

#define API_EXEC_POST (   has_result)
Value:
do { \
if (pstmt->pconn->autocommit && !(has_result)) \
{ \
res = \
cci_end_tran (pstmt->pconn->conn_handle, CCI_TRAN_COMMIT, \
&pstmt->pconn->err_buf); \
if (r != 0) \
return err_from_cci (res); \
} \
} while (0)
if(extra_options)
Definition: dynamic_load.c:958
static int err_from_cci(int err)
Definition: cci_stub.c:415

Definition at line 4577 of file cci_stub.c.

Referenced by ci_stmt_execute_immediate_impl(), and ci_stmt_execute_impl().

#define API_EXEC_PRE ( )
Value:
do { \
if (pstmt->status & CI_STMT_STATUS_EXECUTED) \
{ \
res = complete_statement (pstmt); \
if (res != NO_ERROR) \
return res; \
pstmt->status &= ~CI_STMT_STATUS_EXECUTED; \
} \
if (pstmt->pconn->autocommit && pstmt->pconn->n_need_complete > 0) \
{ \
res = complete_connection (pstmt->pconn); \
if (res != NO_ERROR) \
return res; \
assert (pstmt->pconn->n_need_complete == 0); \
} \
} while (0)
#define NO_ERROR
Definition: error_code.h:46
static int complete_statement(STATEMENT_IMPL *pstmt)
Definition: cci_stub.c:2347
static int complete_connection(CONNECTION_IMPL *impl)
Definition: cci_stub.c:547
#define assert(x)
if(extra_options)
Definition: dynamic_load.c:958

Definition at line 4558 of file cci_stub.c.

Referenced by ci_stmt_execute_immediate_impl(), and ci_stmt_execute_impl().

#define API_VAL_CCI_BIND_FLAG_GET   0x01

Definition at line 209 of file cci_stub.c.

Referenced by get_value_from_req_handle(), and get_value_from_tset().

#define API_VAL_CCI_BIND_FLAG_SET   0x02
#define DBDEF_HEADER_

Definition at line 32 of file cci_stub.c.

Typedef Documentation

typedef struct api_val_s API_VAL

Definition at line 49 of file cci_stub.c.

Definition at line 50 of file cci_stub.c.

Definition at line 44 of file cci_stub.c.

Definition at line 45 of file cci_stub.c.

Definition at line 43 of file cci_stub.c.

Definition at line 53 of file cci_stub.c.

typedef struct cci_object_s CCI_OBJECT

Definition at line 51 of file cci_stub.c.

Definition at line 52 of file cci_stub.c.

Definition at line 41 of file cci_stub.c.

typedef enum impl_handle_type IMPL_HANDLE_TYPE

Definition at line 40 of file cci_stub.c.

Definition at line 42 of file cci_stub.c.

Definition at line 48 of file cci_stub.c.

Definition at line 47 of file cci_stub.c.

Definition at line 46 of file cci_stub.c.

Function Documentation

static int add_batch_params_mapf ( void *  arg,
int  index,
VALUE_AREA va,
API_VALUE val 
)
static
static int add_batch_params_restore_mapf ( void *  arg,
int  index,
VALUE_AREA va,
API_VALUE val 
)
static
static int api_col_delete ( API_COLLECTION col,
long  pos 
)
static
static void api_col_destroy ( API_COLLECTION col)
static

Definition at line 3776 of file cci_stub.c.

References xcol_destroy().

static int api_col_get_elem ( API_COLLECTION col,
long  pos,
CI_TYPE  type,
void *  addr,
size_t  len,
size_t *  outlen,
bool isnull 
)
static
static int api_col_get_elem_domain_info ( API_COLLECTION col,
long  pos,
CI_TYPE *  type,
int *  precision,
int *  scale 
)
static
static int api_col_length ( API_COLLECTION col,
int *  len 
)
static
static int api_col_update ( API_COLLECTION col,
long  pos,
CI_TYPE  type,
void *  ptr,
size_t  size 
)
static
static int api_ores_clear_updates ( API_RESULTSET res)
static
static void api_ores_destroy ( API_RESULTSET res)
static

Definition at line 3073 of file cci_stub.c.

References assert.

static int api_ores_fetch ( API_RESULTSET res,
int  offset,
CI_FETCH_POSITION  pos 
)
static
static int api_ores_get_resultset_metadata ( API_RESULTSET res,
API_RESULTSET_META **  rimpl 
)
static
static int api_ores_get_value ( API_RESULTSET res,
int  index,
CI_TYPE  type,
void *  addr,
size_t  len,
size_t *  outlen,
bool is_null 
)
static
static int api_ores_get_value_by_name ( API_RESULTSET res,
const char *  name,
CI_TYPE  type,
void *  addr,
size_t  len,
size_t *  outlen,
bool isnull 
)
static
static int api_ores_tell ( API_RESULTSET res,
int *  offset 
)
static
static int api_ores_update_value ( API_RESULTSET res,
int  index,
CI_TYPE  type,
void *  addr,
size_t  len 
)
static
static int api_ormeta_get_count ( API_RESULTSET_META rm,
int *  count 
)
static
static int api_ormeta_get_info ( API_RESULTSET_META rm,
int  index,
CI_RMETA_INFO_TYPE  type,
void *  arg,
size_t  size 
)
static
static int api_qres_apply_update ( API_RESULTSET res)
static
static int api_qres_clear_updates ( API_RESULTSET res)
static
static int api_qres_delete_row ( API_RESULTSET res)
static

Definition at line 1652 of file cci_stub.c.

References ER_INTERFACE_NOT_SUPPORTED_OPERATION.

static void api_qres_destroy ( API_RESULTSET res)
static

Definition at line 1888 of file cci_stub.c.

static int api_qres_fetch ( API_RESULTSET res,
int  offset,
CI_FETCH_POSITION  pos 
)
static
static int api_qres_get_resultset_metadata ( API_RESULTSET res,
API_RESULTSET_META **  rimpl 
)
static

Definition at line 1501 of file cci_stub.c.

References assert, resultset_impl_s::got_rm_handle, lazy_bind_qres_rmeta(), NO_ERROR, NULL, and resultset_impl_s::RM.

Referenced by api_ores_get_resultset_metadata().

Here is the caller graph for this function:

static int api_qres_get_value ( API_RESULTSET res,
int  index,
CI_TYPE  type,
void *  addr,
size_t  len,
size_t *  outlen,
bool is_null 
)
static
static int api_qres_get_value_by_name ( API_RESULTSET res,
const char *  name,
CI_TYPE  type,
void *  addr,
size_t  len,
size_t *  outlen,
bool isnull 
)
static

Definition at line 1738 of file cci_stub.c.

References api_qres_get_value(), assert, resultset_impl_s::col_info, ER_INTERFACE_INVALID_NAME, i, NULL, and resultset_impl_s::num_col.

Referenced by api_ores_get_value_by_name().

Here is the caller graph for this function:

static int api_qres_tell ( API_RESULTSET res,
int *  offset 
)
static

Definition at line 1577 of file cci_stub.c.

References NO_ERROR, and resultset_impl_s::offset.

Referenced by api_ores_tell().

Here is the caller graph for this function:

static int api_qrmeta_get_count ( API_RESULTSET_META rm,
int *  count 
)
static

Definition at line 2014 of file cci_stub.c.

References assert, resultset_meta_impl_s::bp, NO_ERROR, NULL, and resultset_impl_s::num_col.

Referenced by api_ormeta_get_count().

Here is the caller graph for this function:

static int api_qrmeta_get_info ( API_RESULTSET_META rm,
int  index,
CI_RMETA_INFO_TYPE  type,
void *  arg,
size_t  size 
)
static
static int api_val_bind_param ( CI_CONNECTION  conn,
int  req_handle,
API_VAL pv,
int  index 
)
static
static void api_val_cci_bind_init ( API_VAL_CCI_BIND bind,
CI_CONNECTION  conn,
int  flag 
)
static
static int api_val_cursor_update ( CI_CONNECTION  conn,
int  req_handle,
int  offset,
int  index,
API_VAL av,
T_CCI_ERROR *  err_buf 
)
static
static int cci_set_to_xcol ( CI_CONNECTION  conn,
T_CCI_SET  tset,
CI_COLLECTION *  col 
)
static
static CI_TYPE cci_u_type_to_type ( T_CCI_U_TYPE  utype)
static

Definition at line 612 of file cci_stub.c.

Referenced by api_qrmeta_get_info(), cci_set_to_xcol(), and ci_pmeta_get_info_impl().

Here is the caller graph for this function:

static int ci_batch_res_get_error_impl ( COMMON_API_STRUCTURE br,
int  index,
int *  err_code,
char *  err_msg,
size_t  buf_size 
)
static
static int ci_batch_res_get_result_impl ( COMMON_API_STRUCTURE br,
int  index,
int *  ret,
int *  nr 
)
static
static int ci_batch_res_query_count_impl ( COMMON_API_STRUCTURE br,
int *  count 
)
static

Definition at line 5301 of file cci_stub.c.

References batch_result_impl_s::bptr, NO_ERROR, and statement_impl_s::num_query.

static int ci_collection_new_impl ( CI_CONNECTION  conn,
CI_COLLECTION *  coll 
)
static

Definition at line 5485 of file cci_stub.c.

References xcol_create().

static int ci_conn_close_impl ( COMMON_API_STRUCTURE conn)
static

Definition at line 4224 of file cci_stub.c.

References connection_impl_s::conn_handle, connection_impl_s::err_buf, and NO_ERROR.

static int ci_conn_commit_impl ( COMMON_API_STRUCTURE conn)
static
static int ci_conn_connect_impl ( COMMON_API_STRUCTURE conn,
const char *  host,
unsigned short  port,
const char *  databasename,
const char *  user_name,
const char *  password 
)
static

Definition at line 4202 of file cci_stub.c.

References connection_impl_s::conn_handle, err_from_cci(), and NO_ERROR.

static int ci_conn_create_statement_impl ( COMMON_API_STRUCTURE conn,
CI_STATEMENT *  stmt 
)
static
static int ci_conn_get_error_impl ( COMMON_API_STRUCTURE conn,
int *  err,
char *  msg,
size_t  size 
)
static

Definition at line 4441 of file cci_stub.c.

References connection_impl_s::err_buf, err_from_cci(), and NO_ERROR.

static int ci_conn_get_option_impl ( COMMON_API_STRUCTURE conn,
CI_CONNECTION_OPTION  option,
void *  arg,
size_t  size 
)
static
static int ci_conn_rollback_impl ( COMMON_API_STRUCTURE conn)
static
static int ci_conn_set_option_impl ( COMMON_API_STRUCTURE conn,
CI_CONNECTION_OPTION  option,
void *  arg,
size_t  size 
)
static
static int ci_err_set_impl ( int  err_code)
static

Definition at line 4186 of file cci_stub.c.

References NO_ERROR.

static int ci_get_connection_opool_impl ( COMMON_API_STRUCTURE pst,
API_OBJECT_RESULTSET_POOL **  rpool 
)
static

Definition at line 5470 of file cci_stub.c.

References NO_ERROR, and connection_impl_s::opool.

static int ci_pmeta_get_count_impl ( COMMON_API_STRUCTURE pmeta,
int *  count 
)
static

Definition at line 5385 of file cci_stub.c.

References parameter_meta_impl_s::bptr, NO_ERROR, and statement_impl_s::num_col.

static int ci_pmeta_get_info_impl ( COMMON_API_STRUCTURE pmeta,
int  index,
CI_PMETA_INFO_TYPE  type,
void *  arg,
size_t  size 
)
static
static int ci_stmt_affected_rows_impl ( COMMON_API_STRUCTURE stmt,
int *  out 
)
static
static int ci_stmt_clear_batch_impl ( COMMON_API_STRUCTURE stmt)
static
static int ci_stmt_get_first_error_impl ( COMMON_API_STRUCTURE stmt,
int *  line,
int *  col,
int *  errcode,
char *  err_msg,
size_t  size 
)
static

Definition at line 5248 of file cci_stub.c.

References ER_INTERFACE_NOT_SUPPORTED_OPERATION.

static int ci_stmt_get_next_error_impl ( COMMON_API_STRUCTURE stmt,
int *  line,
int *  col,
int *  errcode,
char *  err_msg,
size_t  size 
)
static

Definition at line 5265 of file cci_stub.c.

References ER_INTERFACE_NOT_SUPPORTED_OPERATION.

static int ci_stmt_get_option_impl ( COMMON_API_STRUCTURE stmt,
CI_STATEMENT_OPTION  option,
void *  arg,
size_t  size 
)
static
static int ci_stmt_get_parameter_impl ( COMMON_API_STRUCTURE stmt,
int  index,
CI_TYPE  type,
void *  addr,
size_t  len,
size_t *  outlen,
bool isnull 
)
static
static int ci_stmt_get_parameter_metadata_impl ( COMMON_API_STRUCTURE stmt,
CI_PARAMETER_METADATA *  r 
)
static
static int ci_stmt_get_query_type_impl ( COMMON_API_STRUCTURE stmt,
CUBRID_STMT_TYPE type 
)
static

Definition at line 5277 of file cci_stub.c.

References ER_INTERFACE_NOT_SUPPORTED_OPERATION.

static int ci_stmt_get_resultset_impl ( COMMON_API_STRUCTURE stmt,
CI_RESULTSET *  r 
)
static
static int ci_stmt_get_start_line_impl ( COMMON_API_STRUCTURE stmt,
int *  line 
)
static

Definition at line 5289 of file cci_stub.c.

References ER_INTERFACE_NOT_SUPPORTED_OPERATION.

static int ci_stmt_register_out_parameter_impl ( COMMON_API_STRUCTURE stmt,
int  index 
)
static

Definition at line 4933 of file cci_stub.c.

References ER_INTERFACE_NOT_SUPPORTED_OPERATION.

static int ci_stmt_set_option_impl ( COMMON_API_STRUCTURE stmt,
CI_STATEMENT_OPTION  option,
void *  arg,
size_t  size 
)
static
static int complete_connection ( CONNECTION_IMPL impl)
static
static void connection_impl_dtor ( BH_BIND bind)
static

Definition at line 491 of file cci_stub.c.

References API_FREE, connection_impl_s::conn_handle, connection_impl_s::err_buf, connection_impl_s::opool, and opool_destroy().

Referenced by init_connection_impl().

Here is the caller graph for this function:

static void destroy_cci_object ( CCI_OBJECT obj)
static

Definition at line 3264 of file cci_stub.c.

References API_FREE, cci_object_s::pres, and resultset_impl_dtor().

Referenced by opool_get_object_resultset(), opool_ht_elem_dtor(), and opool_oid_delete().

Here is the caller graph for this function:

static int get_type_value_size ( CI_TYPE  type,
int *  len 
)
static

Definition at line 828 of file cci_stub.c.

References assert, ER_INTERFACE_GENERIC, NO_ERROR, and NULL.

Referenced by get_value_from_tset().

Here is the caller graph for this function:

static int get_value_from_api_val ( const API_VAL pv,
CI_TYPE  type,
void *  addr,
size_t  len,
size_t *  outlen,
bool isnull 
)
static
static int get_value_from_req_handle ( CI_CONNECTION  conn,
int  req_handle,
int  index,
CI_TYPE  type,
void *  addr,
size_t  len,
size_t *  outlen,
bool is_null 
)
static
static void init_connection_impl ( CONNECTION_IMPL impl,
int  rid,
CI_CONNECTION  conn,
BH_INTERFACE bh,
int  conn_handle,
CCI_OBJECT_POOL pool 
)
static
static int lazy_bind_pstmt_pmeta ( STATEMENT_IMPL pstmt)
static
static int lazy_bind_qres_rmeta ( RESULTSET_IMPL pres)
static
static int oidstr2xoid ( const char *  oidstr,
CI_CONNECTION  conn,
CI_OID *  xoid 
)
static

Definition at line 3326 of file cci_stub.c.

References connection_impl_s::conn, ER_INTERFACE_GENERIC, NO_ERROR, NULL, p, and str_to_int32().

Referenced by get_value_from_req_handle(), and get_value_from_tset().

Here is the caller graph for this function:

static void on_close_opool_res ( RESULTSET_IMPL impl,
void *  arg 
)
static

Definition at line 3283 of file cci_stub.c.

References NULL, cci_object_s::pres, and cci_object_s::req_handle.

Referenced by create_cci_object().

Here is the caller graph for this function:

static void on_close_statement_res ( RESULTSET_IMPL impl,
void *  arg 
)
static

Definition at line 2427 of file cci_stub.c.

References statement_impl_s::affected_rows, statement_impl_s::has_resultset, and statement_impl_s::res_handle.

Referenced by statement_get_reshandle_or_affectedrows().

Here is the caller graph for this function:

static void opool_destroy ( API_OBJECT_RESULTSET_POOL poo)
static

Definition at line 3193 of file cci_stub.c.

References API_FREE, assert, cci_object_pool_s::ght, hash_destroy(), cci_object_pool_s::ht, NULL, opool_ght_elem_dtor(), and opool_ht_elem_dtor().

Referenced by ci_create_connection_impl(), connection_impl_dtor(), and opool_create().

Here is the caller graph for this function:

static int opool_get_object_resultset ( API_OBJECT_RESULTSET_POOL poo,
CI_OID *  oid,
API_RESULTSET **  rres 
)
static

Definition at line 3100 of file cci_stub.c.

References assert, create_cci_object(), destroy_cci_object(), hash_insert(), hash_lookup(), cci_object_pool_s::ht, NO_ERROR, NULL, and cci_object_s::pres.

Referenced by opool_create().

Here is the caller graph for this function:

static void opool_ght_elem_dtor ( void *  elem)
static

Definition at line 3492 of file cci_stub.c.

References API_FREE.

Referenced by opool_destroy().

Here is the caller graph for this function:

static int opool_ght_keyf ( void *  elem,
void **  rk 
)
static

Definition at line 3474 of file cci_stub.c.

References assert, NO_ERROR, and NULL.

Referenced by opool_create().

Here is the caller graph for this function:

static int opool_ht_comparef ( void *  key1,
void *  key2,
int *  r 
)
static

Definition at line 3378 of file cci_stub.c.

References assert, NO_ERROR, and NULL.

Referenced by opool_create().

Here is the caller graph for this function:

static void opool_ht_elem_dtor ( void *  elem)
static

Definition at line 3460 of file cci_stub.c.

References destroy_cci_object().

Referenced by opool_destroy().

Here is the caller graph for this function:

static int opool_ht_hashf ( void *  key,
unsigned int *  rv 
)
static

Definition at line 3423 of file cci_stub.c.

References assert, NO_ERROR, and NULL.

Referenced by opool_create().

Here is the caller graph for this function:

static int opool_ht_keyf ( void *  elem,
void **  rk 
)
static

Definition at line 3442 of file cci_stub.c.

References assert, NO_ERROR, NULL, and cci_object_s::xoid.

Referenced by opool_create().

Here is the caller graph for this function:

static int opool_oid_delete ( API_OBJECT_RESULTSET_POOL poo,
CI_OID *  oid 
)
static
static int opool_oid_get_classname ( API_OBJECT_RESULTSET_POOL pool,
CI_OID *  oid,
char *  name,
size_t  size 
)
static

Definition at line 3182 of file cci_stub.c.

References ER_INTERFACE_NOT_SUPPORTED_OPERATION.

Referenced by opool_create().

Here is the caller graph for this function:

static int ores_apply_updatef ( void *  arg,
int  index,
VALUE_AREA va,
API_VALUE v 
)
static
static int qres_apply_updatef ( void *  arg,
int  index,
VALUE_AREA va,
API_VALUE v 
)
static

Definition at line 1845 of file cci_stub.c.

References api_val_cursor_update(), resultset_impl_s::conn, resultset_impl_s::err_buf, NO_ERROR, NULL, resultset_impl_s::offset, and resultset_impl_s::req_handle.

Referenced by api_qres_apply_update().

Here is the caller graph for this function:

static void resultset_impl_dtor ( BH_BIND bind)
static
static int set_value_to_api_val ( API_VAL pv,
CI_TYPE  type,
void *  addr,
size_t  len 
)
static
static void statement_impl_dtor ( BH_BIND bind)
static

Definition at line 2189 of file cci_stub.c.

References API_FREE, api_val_dtor(), value_indexer_ifs_s::destroy, value_indexer_s::ifs, NULL, statement_impl_s::params, and statement_impl_s::req_handle.

Referenced by init_statement_impl().

Here is the caller graph for this function:

static T_CCI_U_TYPE type_to_cci_u_type ( CI_TYPE  type)
static

Definition at line 675 of file cci_stub.c.

Referenced by api_val_bind_param(), and xcol_to_cci_set().

Here is the caller graph for this function:

static int xcol_create ( CI_TYPE  type,
CI_CONNECTION  conn,
CI_COLLECTION *  rcol 
)
static
static void xcol_destroy ( CI_COLLECTION  col)
static

Definition at line 3851 of file cci_stub.c.

References API_FREE, value_indexer_ifs_s::destroy, value_indexer_s::ifs, cci_collection_s::indexer, and xcol_elem_dtor().

Referenced by api_col_destroy(), api_val_dtor(), cci_set_to_xcol(), set_value_to_api_val(), and xcol_copy().

Here is the caller graph for this function:

static int xcol_elem_cci_bind_mapf ( void *  arg,
int  index,
VALUE_AREA va,
API_VALUE av 
)
static

Definition at line 3871 of file cci_stub.c.

References api_val_cci_bind_bind(), API_VAL_CCI_BIND_FLAG_SET, api_val_cci_bind_init(), assert, ores_apply_updatef_s::binds, api_val_s::len, NULL, api_val_s::ptr, and api_val_s::type.

Referenced by xcol_to_cci_set().

Here is the caller graph for this function:

static void xcol_elem_dtor ( VALUE_AREA va,
API_VALUE av 
)
static

Definition at line 3800 of file cci_stub.c.

References api_val_dtor().

Referenced by api_col_delete(), and xcol_destroy().

Here is the caller graph for this function:

static void xoid2oidstr ( const CI_OID *  xoid,
char *  oidbuf 
)
static

Definition at line 3302 of file cci_stub.c.

References assert, and NULL.

Referenced by api_ores_apply_update(), api_ores_delete_row(), api_val_cci_bind_bind(), create_cci_object(), and opool_oid_delete().

Here is the caller graph for this function:

Variable Documentation

API_COLLECTION_IFS COL_IFS_
static
Initial value:
= {
}
static int api_col_update(API_COLLECTION *col, long pos, CI_TYPE type, void *ptr, size_t size)
Definition: cci_stub.c:3633
static void api_col_destroy(API_COLLECTION *col)
Definition: cci_stub.c:3776
static int api_col_get_elem_domain_info(API_COLLECTION *col, long pos, CI_TYPE *type, int *precision, int *scale)
Definition: cci_stub.c:3701
static int api_col_insert(API_COLLECTION *col, long pos, CI_TYPE type, void *ptr, size_t size)
Definition: cci_stub.c:3579
static int api_col_length(API_COLLECTION *col, int *len)
Definition: cci_stub.c:3558
static int api_col_get_elem(API_COLLECTION *col, long pos, CI_TYPE type, void *addr, size_t len, size_t *outlen, bool *isnull)
Definition: cci_stub.c:3746
static int api_col_delete(API_COLLECTION *col, long pos)
Definition: cci_stub.c:3668

Definition at line 3783 of file cci_stub.c.

Referenced by xcol_create().

CUBRID_API_FUNCTION_TABLE Cubrid_api_function_table

Definition at line 5491 of file cci_stub.c.

API_RESULTSET_IFS ORES_IFS_
static
Initial value:
= {
}
static int api_ores_fetch(API_RESULTSET *res, int offset, CI_FETCH_POSITION pos)
Definition: cci_stub.c:2738
static int api_ores_update_value(API_RESULTSET *res, int index, CI_TYPE type, void *addr, size_t len)
Definition: cci_stub.c:2900
static int api_ores_delete_row(API_RESULTSET *res)
Definition: cci_stub.c:2805
static int api_ores_clear_updates(API_RESULTSET *res)
Definition: cci_stub.c:2783
static int api_ores_apply_update(API_RESULTSET *res)
Definition: cci_stub.c:2976
static int api_ores_tell(API_RESULTSET *res, int *offset)
Definition: cci_stub.c:2761
static int api_ores_get_resultset_metadata(API_RESULTSET *res, API_RESULTSET_META **rimpl)
Definition: cci_stub.c:2714
static int api_ores_get_value(API_RESULTSET *res, int index, CI_TYPE type, void *addr, size_t len, size_t *outlen, bool *is_null)
Definition: cci_stub.c:2844
static void api_ores_destroy(API_RESULTSET *res)
Definition: cci_stub.c:3073
static int api_ores_get_value_by_name(API_RESULTSET *res, const char *name, CI_TYPE type, void *addr, size_t len, size_t *outlen, bool *isnull)
Definition: cci_stub.c:2873

Definition at line 3079 of file cci_stub.c.

API_RESULTSET_META_IFS ORMETA_IFS_
static
Initial value:
= {
}
static int api_ormeta_get_info(API_RESULTSET_META *rm, int index, CI_RMETA_INFO_TYPE type, void *arg, size_t size)
Definition: cci_stub.c:2686
static int api_ormeta_get_count(API_RESULTSET_META *rm, int *count)
Definition: cci_stub.c:2660

Definition at line 2702 of file cci_stub.c.

API_RESULTSET_IFS QRES_IFS_
static
Initial value:
= {
}
static int api_qres_fetch(API_RESULTSET *res, int offset, CI_FETCH_POSITION pos)
Definition: cci_stub.c:1532
static int api_qres_get_value(API_RESULTSET *res, int index, CI_TYPE type, void *addr, size_t len, size_t *outlen, bool *is_null)
Definition: cci_stub.c:1670
static int api_qres_clear_updates(API_RESULTSET *res)
Definition: cci_stub.c:1593
static int api_qres_tell(API_RESULTSET *res, int *offset)
Definition: cci_stub.c:1577
static void api_qres_destroy(API_RESULTSET *res)
Definition: cci_stub.c:1888
static int api_qres_update_value(API_RESULTSET *res, int index, CI_TYPE type, void *addr, size_t len)
Definition: cci_stub.c:1768
static int api_qres_delete_row(API_RESULTSET *res)
Definition: cci_stub.c:1652
static int api_qres_apply_update(API_RESULTSET *res)
Definition: cci_stub.c:1867
static int api_qres_get_value_by_name(API_RESULTSET *res, const char *name, CI_TYPE type, void *addr, size_t len, size_t *outlen, bool *isnull)
Definition: cci_stub.c:1738
static int api_qres_get_resultset_metadata(API_RESULTSET *res, API_RESULTSET_META **rimpl)
Definition: cci_stub.c:1501

Definition at line 1893 of file cci_stub.c.

API_RESULTSET_META_IFS QRMETA_IFS_
static
Initial value:
= {
}
static int api_qrmeta_get_info(API_RESULTSET_META *rm, int index, CI_RMETA_INFO_TYPE type, void *arg, size_t size)
Definition: cci_stub.c:2036
static int api_qrmeta_get_count(API_RESULTSET_META *rm, int *count)
Definition: cci_stub.c:2014

Definition at line 2152 of file cci_stub.c.