CUBRID Engine
latest
|
#include "config.h"
#include <stddef.h>
#include <stdlib.h>
#include "api_common.h"
#include "parser.h"
#include "dbdef.h"
#include "error_manager.h"
#include "transaction_cl.h"
#include "parse_tree.h"
#include "system_parameter.h"
#include "api_compat.h"
Go to the source code of this file.
Classes | |
struct | ci_conn_option_s |
struct | ci_stmt_option_s |
struct | ci_stmt_error_info_s |
struct | ci_conn_s |
struct | rs_meta_info |
struct | stmt_result_info_s |
struct | ci_batch_data |
union | ci_batch_data::_data |
struct | ci_batch_result_info_s |
struct | ci_batch_result_s |
struct | ci_stmt_s |
struct | ci_resultset_s |
struct | ci_resultset_meta_s |
struct | ci_parater_meta_s |
Macros | |
#define | api_er_set(a, b, c, d) er_set(a,b,c,d) |
#define | api_get_errmsg() er_msg() |
#define | api_get_errid er_errid |
#define | HAS_RESULT(stmt_type) |
#define | VERSION_LENGTH 32 |
Typedefs | |
typedef struct ci_conn_s | CI_CONN_STRUCTURE |
typedef struct ci_conn_option_s | CI_CONN_OPT_STRUCTURE |
typedef struct ci_stmt_s | CI_STMT_STRUCTURE |
typedef struct ci_stmt_option_s | CI_STMT_OPT_STRUCTURE |
typedef struct ci_resultset_s | CI_RESULTSET_STRUCTURE |
typedef struct ci_resultset_meta_s | CI_RESULTSET_META_STRUCTURE |
typedef struct ci_parater_meta_s | CI_PARAM_META_STRUCTURE |
typedef struct ci_batch_data | CI_BATCH_DATA |
typedef struct ci_batch_result_s | CI_BATCH_RESULT_STRUCTURE |
typedef struct ci_batch_result_info_s | CI_BATCH_RESULT_INFO |
typedef struct ci_stmt_error_info_s | STMT_ERROR_INFO |
typedef struct rs_meta_info | RS_META_INFO |
typedef struct stmt_result_info_s | STMT_RESULT_INFO |
Functions | |
void | sigfpe_handler (int sig) |
int | db_type_to_type (DB_TYPE dt, CI_TYPE *xt) |
int | type_to_db_type (CI_TYPE xt, DB_TYPE *dt) |
void | xoid2oid (CI_OID *xoid, OID *oid) |
void | oid2xoid (OID *oid, BIND_HANDLE conn, CI_OID *xoid) |
int | coerce_value_to_db_value (CI_TYPE type, void *addr, size_t len, DB_VALUE *dbval, bool domain_initialized) |
int | coerce_db_value_to_value (const DB_VALUE *dbval, BIND_HANDLE conn, CI_TYPE type, void *addr, size_t len, size_t *outlen, bool *isnull) |
int | create_db_value_bind_table (int nvalue, void *impl, int auto_apply, BIND_HANDLE conn_handle, int(*get_index_by_name)(void *, const char *, int *ri), int(*get_db_value)(void *, int, DB_VALUE *), int(*set_db_value)(void *, int, DB_VALUE *), int(*init_domain)(void *, int, DB_VALUE *), VALUE_BIND_TABLE **rtable) |
int | api_object_resultset_pool_create (BH_INTERFACE *ifs, BIND_HANDLE conn, API_OBJECT_RESULTSET_POOL **pool) |
int | api_collection_create_from_db_value (BIND_HANDLE conn, const DB_VALUE *val, API_COLLECTION **rc) |
int | api_collection_set_to_db_value (API_COLLECTION *col, DB_VALUE *val) |
int | api_collection_create (BIND_HANDLE conn, API_COLLECTION **rc) |
int | ci_err_set (int error_code) |
Variables | |
void(* | prev_sigfpe_handler )(int) |
#define api_er_set | ( | a, | |
b, | |||
c, | |||
d | |||
) | er_set(a,b,c,d) |
Definition at line 40 of file db_stub.h.
Referenced by ci_err_set(), and value_to_db_value().
#define api_get_errid er_errid |
Definition at line 42 of file db_stub.h.
Referenced by ci_conn_get_error_impl(), stmt_exec_batch_query_internal(), and stmt_reset_session_and_parse().
#define api_get_errmsg | ( | ) | er_msg() |
Definition at line 41 of file db_stub.h.
Referenced by ci_conn_get_error_impl(), stmt_exec_batch_query_internal(), stmt_exec_prepared_batch_internal(), stmt_make_error_info(), and stmt_reset_session_and_parse().
#define HAS_RESULT | ( | stmt_type | ) |
Definition at line 44 of file db_stub.h.
Referenced by stmt_exec_one_statement(), stmt_exec_prepared_batch_internal(), and stmt_prepare_internal().
#define VERSION_LENGTH 32 |
Definition at line 54 of file db_stub.h.
Referenced by ci_conn_get_option_impl().
typedef struct ci_batch_data CI_BATCH_DATA |
typedef struct ci_batch_result_info_s CI_BATCH_RESULT_INFO |
typedef struct ci_batch_result_s CI_BATCH_RESULT_STRUCTURE |
typedef struct ci_conn_option_s CI_CONN_OPT_STRUCTURE |
typedef struct ci_conn_s CI_CONN_STRUCTURE |
typedef struct ci_parater_meta_s CI_PARAM_META_STRUCTURE |
typedef struct ci_resultset_meta_s CI_RESULTSET_META_STRUCTURE |
typedef struct ci_resultset_s CI_RESULTSET_STRUCTURE |
typedef struct ci_stmt_option_s CI_STMT_OPT_STRUCTURE |
typedef struct ci_stmt_s CI_STMT_STRUCTURE |
typedef struct rs_meta_info RS_META_INFO |
typedef struct ci_stmt_error_info_s STMT_ERROR_INFO |
typedef struct stmt_result_info_s STMT_RESULT_INFO |
int api_collection_create | ( | BIND_HANDLE | conn, |
API_COLLECTION ** | rc | ||
) |
Definition at line 467 of file db_collection.c.
References apif_collection_create(), ER_INTERFACE_INVALID_ARGUMENT, NO_ERROR, and NULL.
Referenced by ci_collection_new_impl().
int api_collection_create_from_db_value | ( | BIND_HANDLE | conn, |
const DB_VALUE * | val, | ||
API_COLLECTION ** | rc | ||
) |
Definition at line 353 of file db_collection.c.
References apif_collection_create(), collection_s_::col, db_get_set(), DB_VALUE_DOMAIN_TYPE, api_collection_ifs_s::destroy, collection_s_::dt, ER_INTERFACE_INVALID_ARGUMENT, fill_collection(), api_collection_s::ifs, NO_ERROR, NULL, and TP_IS_SET_TYPE.
Referenced by db_value_to_value().
int api_collection_set_to_db_value | ( | API_COLLECTION * | col, |
DB_VALUE * | val | ||
) |
Definition at line 417 of file db_collection.c.
References db_col_create(), db_col_free(), DB_TYPE_C_SET, DB_VALUE_DOMAIN_TYPE, db_value_put(), collection_s_::dt, ER_INTERFACE_GENERIC, ER_INTERFACE_INVALID_ARGUMENT, value_indexer_s::ifs, collection_s_::indexer, value_indexer_ifs_s::length, value_indexer_ifs_s::map, NO_ERROR, NULL, set_to_db_value_mapf(), and TP_IS_SET_TYPE.
Referenced by value_to_db_value().
int api_object_resultset_pool_create | ( | BH_INTERFACE * | ifs, |
BIND_HANDLE | conn, | ||
API_OBJECT_RESULTSET_POOL ** | pool | ||
) |
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().
int ci_err_set | ( | int | error_code | ) |
Definition at line 3064 of file db_stub.c.
References api_er_set, ARG_FILE_LINE, ER_ERROR_SEVERITY, and NO_ERROR.
Referenced by stmt_reset_session_and_parse().
int coerce_db_value_to_value | ( | const DB_VALUE * | dbval, |
BIND_HANDLE | conn, | ||
CI_TYPE | type, | ||
void * | addr, | ||
size_t | len, | ||
size_t * | outlen, | ||
bool * | isnull | ||
) |
Definition at line 1177 of file db_value_table.c.
References db_value_to_value(), ER_INTERFACE_INVALID_ARGUMENT, and NULL.
Referenced by col_api_get_elem(), and stmt_get_parameter_internal().
int coerce_value_to_db_value | ( | CI_TYPE | type, |
void * | addr, | ||
size_t | len, | ||
DB_VALUE * | dbval, | ||
bool | domain_initialized | ||
) |
Definition at line 1155 of file db_value_table.c.
References ER_INTERFACE_INVALID_ARGUMENT, NULL, and value_to_db_value().
Referenced by col_api_insert(), col_api_update(), and stmt_set_parameter_internal().
int create_db_value_bind_table | ( | int | nvalue, |
void * | impl, | ||
int | auto_apply, | ||
BIND_HANDLE | conn_handle, | ||
int(*)(void *, const char *, int *ri) | get_index_by_name, | ||
int(*)(void *, int, DB_VALUE *) | get_db_value, | ||
int(*)(void *, int, DB_VALUE *) | set_db_value, | ||
int(*)(void *, int, DB_VALUE *) | init_domain, | ||
VALUE_BIND_TABLE ** | rtable | ||
) |
Referenced by create_resultset_value_table(), and or_create().
int db_type_to_type | ( | DB_TYPE | dt, |
CI_TYPE * | xt | ||
) |
Definition at line 959 of file db_value_table.c.
References DB_TYPE_BIGINT, DB_TYPE_BIT, DB_TYPE_BLOB, DB_TYPE_CHAR, DB_TYPE_CLOB, DB_TYPE_DATE, DB_TYPE_DATETIME, DB_TYPE_DOUBLE, DB_TYPE_ELO, DB_TYPE_FLOAT, DB_TYPE_INTEGER, DB_TYPE_MONETARY, DB_TYPE_MULTISET, DB_TYPE_NCHAR, DB_TYPE_NULL, DB_TYPE_NUMERIC, DB_TYPE_OBJECT, DB_TYPE_OID, DB_TYPE_SEQUENCE, DB_TYPE_SET, DB_TYPE_SHORT, DB_TYPE_STRING, DB_TYPE_TIME, DB_TYPE_TIMESTAMP, DB_TYPE_VARBIT, DB_TYPE_VARNCHAR, ER_INTERFACE_GENERIC, ER_INTERFACE_INVALID_ARGUMENT, NO_ERROR, and NULL.
Referenced by api_rmeta_get_info(), col_api_get_elem_domain_info(), pmeta_get_info_internal(), and rm_api_get_info().
void oid2xoid | ( | OID * | oid, |
BIND_HANDLE | conn, | ||
CI_OID * | xoid | ||
) |
Definition at line 1138 of file db_value_table.c.
References db_identifier::pageid, db_identifier::slotid, and db_identifier::volid.
Referenced by db_value_to_value().
void sigfpe_handler | ( | int | sig | ) |
Definition at line 822 of file db_admin.c.
References os_set_signal_handler(), and prev_sigfpe_handler.
Referenced by conn_restart_client(), and db_restart().
int type_to_db_type | ( | CI_TYPE | xt, |
DB_TYPE * | dt | ||
) |
Definition at line 1045 of file db_value_table.c.
References DB_TYPE_BIGINT, DB_TYPE_BIT, DB_TYPE_CHAR, DB_TYPE_DATE, DB_TYPE_DATETIME, DB_TYPE_DOUBLE, DB_TYPE_FLOAT, DB_TYPE_INTEGER, DB_TYPE_MONETARY, DB_TYPE_NCHAR, DB_TYPE_NULL, DB_TYPE_NUMERIC, DB_TYPE_OBJECT, DB_TYPE_SEQUENCE, DB_TYPE_SHORT, DB_TYPE_TIME, DB_TYPE_TIMESTAMP, DB_TYPE_VARBIT, DB_TYPE_VARCHAR, ER_INTERFACE_GENERIC, ER_INTERFACE_INVALID_ARGUMENT, NO_ERROR, and NULL.
Referenced by value_to_db_value().
void xoid2oid | ( | CI_OID * | xoid, |
OID * | oid | ||
) |
Definition at line 1121 of file db_value_table.c.
References assert, NULL, db_identifier::pageid, db_identifier::slotid, and db_identifier::volid.
Referenced by orp_api_get_object_resultset(), orp_oid_delete(), orp_oid_get_classname(), and value_to_db_value().
void(* prev_sigfpe_handler) (int) |
Definition at line 70 of file db_admin.c.
Referenced by ci_conn_close_impl(), conn_restart_client(), db_restart(), db_shutdown(), and sigfpe_handler().