CUBRID Engine
latest
|
Go to the source code of this file.
Classes | |
struct | cubridvar |
struct | cubridda |
struct | cubridca |
struct | var_char |
Macros | |
#define | SQL_NOT_FOUND 100 /* sqlcode for not found */ |
#define | SQL_WARNING_CHAR 'W' /* to indicate warning */ |
#define | CUBRIDDA_TEMPLATE(num_vars) |
#define | ALLOC_CUBRIDDA(num_vars) |
#define | SQLCODE sqlca.sqlcode |
#define | SQLFILE sqlca.sqlfile |
#define | SQLLINE sqlca.sqlline |
#define | SQLERRML sqlca.sqlerrm.sqlerrml |
#define | SQLERRMC sqlca.sqlerrm.sqlerrmc |
#define | SQLERRD sqlca.sqlerrd |
#define | SQLERRD2 sqlca.sqlerrd[2] |
#define | SQLWARN0 sqlca.sqlwarn.sqlwarn0 |
#define | SQLWARN1 sqlca.sqlwarn.sqlwarn1 |
#define | SQLWARN2 sqlca.sqlwarn.sqlwarn2 |
#define | SQLWARN3 sqlca.sqlwarn.sqlwarn3 |
#define | SQLWARN4 sqlca.sqlwarn.sqlwarn4 |
Typedefs | |
typedef short | DB_INDICATOR |
typedef struct cubridvar | CUBRIDVAR |
typedef struct cubridda | CUBRIDDA |
typedef struct cubridca | CUBRIDCA |
typedef struct var_char | VARCHAR |
typedef VARCHAR | varchar |
Functions | |
void | uci_startup (const char *) |
void | uci_start (void *, const char *, int, unsigned int) |
void | uci_end (void) |
void | uci_stop (void) |
long | uci_get_sqlcode (void) |
char | uci_get_sqlwarn_0 (void) |
void | uci_connect (const char *, const char *, const char *) |
void | uci_disconnect (void) |
void | uci_commit (void) |
void | uci_rollback (void) |
void | uci_static (int, const char *, int, int) |
void | uci_open_cs (int, const char *, int, int, int) |
void | uci_fetch_cs (int, int) |
void | uci_delete_cs (int) |
void | uci_close_cs (int) |
void | uci_psh_curr_csr_oid (int) |
void | uci_prepare (int, const char *, int) |
void | uci_describe (int, CUBRIDDA *) |
void | uci_execute (int, int) |
void | uci_execute_immediate (const char *, int) |
void | uci_object_describe (DB_OBJECT *, int, const char **, CUBRIDDA *) |
void | uci_object_fetch (DB_OBJECT *, int, const char **, int) |
void | uci_set_num_db_values (int) |
void | uci_get_value (int, DB_INDICATOR *, void *, DB_TYPE_C, int, int *) |
void | uci_get_db_value (int, DB_VALUE *) |
void | uci_get_descriptor (int, CUBRIDDA *) |
void | uci_put_value (DB_INDICATOR *, DB_TYPE, int, int, DB_TYPE_C, void *, int) |
void | uci_put_descriptor (CUBRIDDA *) |
Variables | |
unsigned int | _uci_opt |
CUBRIDCA | sqlca |
DB_INDICATOR | uci_null_ind |
static char | uci_esqlxc_file |
#define ALLOC_CUBRIDDA | ( | num_vars | ) |
Definition at line 56 of file cubrid_esql.h.
#define CUBRIDDA_TEMPLATE | ( | num_vars | ) |
Definition at line 47 of file cubrid_esql.h.
#define SQL_NOT_FOUND 100 /* sqlcode for not found */ |
Definition at line 43 of file cubrid_esql.h.
Referenced by uci_delete_cs(), uci_execute(), uci_execute_immediate(), uci_fetch_cs(), uci_get_db_value(), uci_get_next_column(), uci_open_cs(), uci_psh_curr_csr_oid(), and uci_static().
#define SQL_WARNING_CHAR 'W' /* to indicate warning */ |
Definition at line 44 of file cubrid_esql.h.
#define SQLCODE sqlca.sqlcode |
Definition at line 60 of file cubrid_esql.h.
Referenced by pop_uci_environment(), set_sqlca_err(), uci_delete_cs(), uci_execute(), uci_execute_immediate(), uci_fetch_cs(), uci_get_db_value(), uci_get_next_column(), uci_open_cs(), uci_psh_curr_csr_oid(), uci_start(), and uci_static().
#define SQLERRD sqlca.sqlerrd |
Definition at line 65 of file cubrid_esql.h.
#define SQLERRD2 sqlca.sqlerrd[2] |
Definition at line 66 of file cubrid_esql.h.
#define SQLERRMC sqlca.sqlerrm.sqlerrmc |
Definition at line 64 of file cubrid_esql.h.
Referenced by pop_uci_environment(), set_sqlca_err(), uci_start(), and uci_stop().
#define SQLERRML sqlca.sqlerrm.sqlerrml |
Definition at line 63 of file cubrid_esql.h.
Referenced by pop_uci_environment(), set_sqlca_err(), and uci_start().
#define SQLFILE sqlca.sqlfile |
Definition at line 61 of file cubrid_esql.h.
Referenced by uci_start().
#define SQLLINE sqlca.sqlline |
Definition at line 62 of file cubrid_esql.h.
Referenced by uci_start().
#define SQLWARN0 sqlca.sqlwarn.sqlwarn0 |
Definition at line 67 of file cubrid_esql.h.
#define SQLWARN1 sqlca.sqlwarn.sqlwarn1 |
Definition at line 68 of file cubrid_esql.h.
#define SQLWARN2 sqlca.sqlwarn.sqlwarn2 |
Definition at line 69 of file cubrid_esql.h.
#define SQLWARN3 sqlca.sqlwarn.sqlwarn3 |
Definition at line 70 of file cubrid_esql.h.
#define SQLWARN4 sqlca.sqlwarn.sqlwarn4 |
Definition at line 71 of file cubrid_esql.h.
typedef short DB_INDICATOR |
Definition at line 73 of file cubrid_esql.h.
Definition at line 141 of file cubrid_esql.h.
void uci_close_cs | ( | int | ) |
Definition at line 1211 of file esql_cli.c.
References CHK_SQLCODE, cursor::fetched_tuples, free_cursor(), get_cursor(), NULL, PUT_UCI_ERR_CURSORNOTOPENED, set_sqlca_err(), and SQLCA_NUM_AFFECTED_OBJECTS.
void uci_commit | ( | void | ) |
Definition at line 676 of file esql_cli.c.
References CHECK_DBI, CHK_SQLCODE, db_commit_transaction(), error(), free_cursor(), free_dynamic(), free_pointers(), and NULL.
Referenced by uci_disconnect().
Definition at line 611 of file esql_cli.c.
References au_get_public_user_name(), CHECK_DBI, CHK_SQLCODE, connected, db_login(), db_restart(), error(), program_name, and uci_disconnect().
void uci_delete_cs | ( | int | ) |
Definition at line 1176 of file esql_cli.c.
References CHECK_DBI, CHK_SQLCODE, db_drop(), db_get_object(), db_query_get_tuple_oid(), get_cursor(), NULL, PUT_UCI_ERR_CURSORNOTOPENED, cursor::result, set_sqlca_err(), SQL_NOT_FOUND, and SQLCODE.
void uci_describe | ( | int | , |
CUBRIDDA * | |||
) |
Definition at line 1328 of file esql_cli.c.
References CHK_SQLCODE, dynamic::column_spec, copy_column_spec_to_sqlda(), get_dynamic(), HAS_RESULT, NULL, PUT_UCI_ERR_NOTPREPAREDSTMT, set_sqlca_err(), cubridda::sqlcmd, cubridda::sqldesc, and dynamic::stmt_type.
void uci_disconnect | ( | void | ) |
Definition at line 639 of file esql_cli.c.
References CHECK_DBI, CHK_SQLCODE, connected, db_shutdown(), drop_uci_env_stack(), free_db_values(), free_repetitive(), prm_get_commit_on_shutdown(), uci_commit(), and uci_rollback().
Referenced by uci_connect(), and uci_stop().
void uci_end | ( | void | ) |
Definition at line 542 of file esql_cli.c.
References CHECK_DBI, db_query_end(), is_uci_start_state, and NULL.
void uci_execute | ( | int | , |
int | |||
) |
Definition at line 1367 of file esql_cli.c.
References AFFECT_OBJECTS, CHECK_DBI, CHK_SQLCODE, curr_result_column, db_execute_and_keep_statement(), db_push_values(), db_query_column_count(), db_query_first_tuple(), db_query_tuple_count(), db_Value_table, free_pointers(), get_dynamic(), HAS_RESULT, is_uci_start_state, NULL, num_curr_result_columns, dynamic::num_markers, pop_uci_environment(), PUT_UCI_ERR_MULTIPLEOBJECTS, PUT_UCI_ERR_NOTPREPAREDSTMT, PUT_UCI_ERR_TOOFEWHOSTVARS, dynamic::session, set_sqlca_err(), SET_WARN_VARS_MISMATCH, SQL_NOT_FOUND, SQLCA_NUM_AFFECTED_OBJECTS, SQLCODE, dynamic::stmt_id, and dynamic::stmt_type.
void uci_execute_immediate | ( | const char * | , |
int | |||
) |
Definition at line 1460 of file esql_cli.c.
References AFFECT_OBJECTS, assert, CHECK_DBI, CHK_SQLCODE, db_close_session(), db_compile_statement(), db_execute_statement(), db_get_statement_type(), db_number_of_input_markers(), db_open_buffer(), db_push_values(), db_query_end(), er_errid(), error(), is_uci_start_state, NO_ERROR, NULL, pop_uci_environment(), PUT_UCI_ERR_NOMARKALLOWED, set_sqlca_err(), SQL_NOT_FOUND, SQLCA_NUM_AFFECTED_OBJECTS, and SQLCODE.
void uci_fetch_cs | ( | int | , |
int | |||
) |
Definition at line 1125 of file esql_cli.c.
References CHECK_DBI, CHK_SQLCODE, cursor::curr_column, DB_CURSOR_END, db_query_column_count(), db_query_next_tuple(), cursor::fetched_tuples, free_pointers(), get_cursor(), NULL, cursor::num_columns, PUT_UCI_ERR_CURSORNOTOPENED, cursor::result, set_sqlca_err(), SET_WARN_VARS_MISMATCH, SQL_NOT_FOUND, SQLCA_NUM_AFFECTED_OBJECTS, and SQLCODE.
void uci_get_db_value | ( | int | , |
DB_VALUE * | |||
) |
Definition at line 1985 of file esql_cli.c.
References CHECK_DBI, CHK_SQLCODE, cursor::curr_column, curr_result, curr_result_column, db_query_get_tuple_value(), error(), get_cursor(), NULL, cursor::num_columns, num_curr_result_columns, put_pointer(), PUT_UCI_ERR_CURSORNOTOPENED, PUT_UCI_ERR_TOOMANYHOSTVARS, cursor::result, set_sqlca_err(), SQL_NOT_FOUND, and SQLCODE.
void uci_get_descriptor | ( | int | , |
CUBRIDDA * | |||
) |
Definition at line 2072 of file esql_cli.c.
References i, NULL, cubridvar::sqlctype, cubridvar::sqldata, cubridvar::sqlind, cubridvar::sqllen, cubridda::sqlvar, STRING_C_TYPE, uci_get_value(), and uci_get_value_indirect().
long uci_get_sqlcode | ( | void | ) |
Definition at line 583 of file esql_cli.c.
References cubridca::sqlcode.
char uci_get_sqlwarn_0 | ( | void | ) |
Definition at line 593 of file esql_cli.c.
References cubridca::sqlwarn, and cubridca::sqlwarn0.
void uci_get_value | ( | int | , |
DB_INDICATOR * | , | ||
void * | , | ||
DB_TYPE_C | , | ||
int | , | ||
int * | |||
) |
Definition at line 1830 of file esql_cli.c.
References _uci_opt, CHECK_DBI, CHK_SQLCODE, DB_TYPE_C_CHAR, DB_TYPE_C_VARCHAR, db_value_get(), error(), NULL, PUT_UCI_ERR_NULLINDNEEDED, set_sqlca_err(), SET_WARN_OUTPUT_TRUNC, uci_get_next_column(), and UCI_OPT_UNSAFE_NULL.
Referenced by uci_get_descriptor().
Definition at line 1548 of file esql_cli.c.
References CHECK_DBI, CHK_SQLCODE, copy_column_spec_to_sqlda(), db_object_describe(), db_query_format_free(), error(), and NULL.
Definition at line 1580 of file esql_cli.c.
References CHECK_DBI, CHK_SQLCODE, curr_result_column, db_object_fetch(), db_query_column_count(), db_query_first_tuple(), error(), num_curr_result_columns, and SET_WARN_VARS_MISMATCH.
void uci_open_cs | ( | int | , |
const char * | , | ||
int | , | ||
int | , | ||
int | |||
) |
Definition at line 995 of file esql_cli.c.
References alloc_cursor(), assert, CHECK_DBI, CHK_SQLCODE, CUBRID_STMT_SELECT, db_close_session(), db_compile_statement(), db_execute_and_keep_statement(), db_get_statement_type(), db_include_oid(), db_number_of_input_markers(), db_open_buffer(), db_push_values(), db_Value_table, er_errid(), error(), get_cursor(), get_dynamic(), is_uci_start_state, NO_ERROR, NULL, dynamic::num_markers, pop_uci_environment(), PUT_UCI_ERR_CURSORSTILLOPEN, PUT_UCI_ERR_NOTPREPAREDSTMT, PUT_UCI_ERR_NOTSELECTSTMT, PUT_UCI_ERR_TOOFEWHOSTVARS, dynamic::session, set_sqlca_err(), SET_WARN_VARS_MISMATCH, SQL_NOT_FOUND, SQLCA_NUM_AFFECTED_OBJECTS, SQLCODE, dynamic::stmt_id, and dynamic::stmt_type.
void uci_prepare | ( | int | , |
const char * | , | ||
int | |||
) |
Definition at line 1273 of file esql_cli.c.
References alloc_dynamic(), assert, CHECK_DBI, CHK_SQLCODE, db_close_session(), db_compile_statement(), db_get_query_type_list(), db_get_statement_type(), db_number_of_input_markers(), db_open_buffer(), db_query_format_free(), er_errid(), error(), NO_ERROR, and NULL.
void uci_psh_curr_csr_oid | ( | int | ) |
Definition at line 1235 of file esql_cli.c.
References CHECK_DBI, check_stack_size(), CHK_SQLCODE, db_query_get_tuple_oid(), db_Value_table, get_cursor(), NULL, PUT_UCI_ERR_CURSORNOTOPENED, cursor::result, set_sqlca_err(), SQL_NOT_FOUND, and SQLCODE.
void uci_put_descriptor | ( | CUBRIDDA * | ) |
Definition at line 2051 of file esql_cli.c.
References for(), i, cubridvar::sqlctype, cubridvar::sqldata, cubridda::sqldesc, cubridvar::sqlind, cubridvar::sqllen, cubridvar::sqlprec, cubridvar::sqlscale, cubridvar::sqltype, cubridda::sqlvar, and uci_put_value().
void uci_put_value | ( | DB_INDICATOR * | , |
DB_TYPE | , | ||
int | , | ||
int | , | ||
DB_TYPE_C | , | ||
void * | , | ||
int | |||
) |
Definition at line 1689 of file esql_cli.c.
References check_stack_size(), CHK_SQLCODE, DB_DEFAULT_PRECISION, db_make_null(), DB_TYPE_C_CHAR, DB_TYPE_C_NCHAR, DB_TYPE_C_VARCHAR, DB_TYPE_C_VARNCHAR, DB_TYPE_DB_VALUE, db_value_clone(), db_value_domain_init(), db_value_put(), db_Value_table, IS_NULL_INDICATED, NO_ERROR, set_sqlca_err(), and strlen.
Referenced by uci_put_descriptor().
void uci_rollback | ( | void | ) |
Definition at line 697 of file esql_cli.c.
References CHECK_DBI, CHK_SQLCODE, db_abort_transaction(), error(), free_cursor(), free_dynamic(), free_pointers(), and NULL.
Referenced by uci_disconnect(), and uci_stop().
void uci_set_num_db_values | ( | int | ) |
void uci_start | ( | void * | , |
const char * | , | ||
int | , | ||
unsigned | int | ||
) |
Definition at line 491 of file esql_cli.c.
References _uci_opt, curr_file, curr_filename, curr_lineno, db_value_clear(), db_Value_table, i, is_uci_start_state, NO_ERROR, push_uci_environment(), SQLCA_IS_WARNING, SQLCA_NO_WHERE, SQLCA_NULL_IN_AGG, SQLCA_NUM_AFFECTED_OBJECTS, SQLCA_OUTPUT_TRUNC, SQLCA_VARS_MISMATCH, SQLCODE, SQLERRMC, SQLERRML, SQLFILE, and SQLLINE.
Referenced by uci_stop().
void uci_startup | ( | const char * | ) |
Definition at line 446 of file esql_cli.c.
References db_Value_table, i, NULL, program_name, cubridca::sqlcabc, cubridca::sqlcaid, cubridca::sqlcode, cubridca::sqlerrd, cubridca::sqlerrm, cubridca::sqlerrmc, cubridca::sqlerrml, cubridca::sqlerrp, cubridca::sqlext, cubridca::sqlfile, cubridca::sqlline, cubridca::sqlwarn, cubridca::sqlwarn0, cubridca::sqlwarn1, cubridca::sqlwarn2, cubridca::sqlwarn3, cubridca::sqlwarn4, cubridca::sqlwarn5, cubridca::sqlwarn6, cubridca::sqlwarn7, and uci_null_ind.
void uci_static | ( | int | , |
const char * | , | ||
int | , | ||
int | |||
) |
Definition at line 733 of file esql_cli.c.
References AFFECT_OBJECTS, alloc_repetitive(), assert, attr_val::attr_desc, db_gadget::attrs, CHECK_DBI, CHK_SQLCODE, CUBRID_STMT_INSERT, curr_result_column, db_close_session(), db_compile_statement(), db_execute_statement(), db_gadget_bind(), db_gadget_create(), db_gadget_destroy(), db_gadget_exec(), db_get_db_value_query_result(), db_get_parser(), db_get_statement(), db_get_statement_type(), db_make_object(), db_open_buffer(), db_push_values(), db_query_column_count(), db_query_first_tuple(), db_query_tuple_count(), db_Value_table, er_errid(), error(), parser_context::error_msgs, free_and_init, free_pointers(), repetitive::gadget, get_repetitive(), HAS_RESULT, i, is_uci_start_state, sm_descriptor::name, parser_node::next, NO_ERROR, parser_node::node_type, NULL, num_curr_result_columns, parser, pop_uci_environment(), pt_attrs_part(), pt_class_part(), pt_evaluate_tree_having_serial(), pt_from_entity_part(), pt_get_name(), PT_HOST_VAR, PT_INSERT, pt_is_expr_node, pt_is_value_node, pt_length_of_list(), pt_value_to_db(), pt_values_part(), PUT_UCI_ERR_MULTIPLEOBJECTS, PUT_UCI_ERR_NOMOREMEMORY, repetitive::session, set_sqlca_err(), SET_WARN_VARS_MISMATCH, SQL_NOT_FOUND, SQLCA_NUM_AFFECTED_OBJECTS, SQLCODE, repetitive::stmt_id, and repetitive::stmt_type.
void uci_stop | ( | void | ) |
Definition at line 563 of file esql_cli.c.
References connected, NULL, SQLERRMC, uci_disconnect(), uci_rollback(), and uci_start().
unsigned int _uci_opt |
Definition at line 345 of file esql_cli.c.
Referenced by uci_get_value(), uci_get_value_indirect(), and uci_start().
CUBRIDCA sqlca |
Definition at line 346 of file esql_cli.c.
|
static |
Definition at line 181 of file cubrid_esql.h.
DB_INDICATOR uci_null_ind |
Definition at line 347 of file esql_cli.c.
Referenced by uci_startup().