RTS API Documentation
1.10.11
|
#include <switch.h>
Go to the source code of this file.
Variables | |
uint8_t | skip_autocommit_flip = 0 |
switch_bool_t switch_odbc_available | ( | void | ) |
Definition at line 809 of file switch_odbc.c.
References SWITCH_FALSE, and SWITCH_TRUE.
Referenced by _switch_cache_db_get_db_handle(), and switch_database_available().
int switch_odbc_handle_affected_rows | ( | switch_odbc_handle_t * | handle | ) |
Definition at line 800 of file switch_odbc.c.
Referenced by switch_cache_db_affected_rows().
switch_odbc_status_t switch_odbc_handle_callback_exec_detailed | ( | const char * | file, |
const char * | func, | ||
int | line, | ||
switch_odbc_handle_t * | handle, | ||
const char * | sql, | ||
switch_core_db_callback_func_t | callback, | ||
void * | pdata, | ||
char ** | err | ||
) |
Execute the sql query and issue a callback for each row returned.
file | the file from which this function is called |
func | the function from which this function is called |
line | the line from which this function is called |
handle | the ODBC handle |
sql | the sql string to execute |
callback | the callback function to execute |
pdata | the state data passed on each callback invocation |
Definition at line 547 of file switch_odbc.c.
References memset(), switch_assert, SWITCH_CHANNEL_ID_LOG, SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, switch_log_printf(), SWITCH_ODBC_FAIL, switch_odbc_handle_get_error(), SWITCH_ODBC_SUCCESS, switch_safe_free, switch_str_nil, and zstr.
switch_odbc_status_t switch_odbc_handle_connect | ( | switch_odbc_handle_t * | handle | ) |
Definition at line 343 of file switch_odbc.c.
References FALSE, SWITCH_CHANNEL_LOG, SWITCH_FALSE, SWITCH_LOG_DEBUG1, SWITCH_LOG_ERROR, switch_log_printf(), SWITCH_ODBC_FAIL, switch_odbc_handle_disconnect(), switch_odbc_handle_get_error(), SWITCH_ODBC_STATE_CONNECTED, SWITCH_ODBC_SUCCESS, SWITCH_TRUE, and TRUE.
Referenced by _switch_cache_db_get_db_handle(), and switch_odbc_handle_disconnect().
void switch_odbc_handle_destroy | ( | switch_odbc_handle_t ** | handlep | ) |
Definition at line 742 of file switch_odbc.c.
References switch_odbc_handle_disconnect(), and switch_safe_free.
Referenced by _switch_cache_db_get_db_handle(), and sql_close().
switch_odbc_status_t switch_odbc_handle_disconnect | ( | switch_odbc_handle_t * | handle | ) |
Definition at line 126 of file switch_odbc.c.
References DEFAULT_ODBC_RETRIES, SWITCH_CHANNEL_LOG, switch_event_add_header(), switch_event_create, switch_event_fire, SWITCH_EVENT_TRAP, SWITCH_LOG_CRIT, SWITCH_LOG_DEBUG10, SWITCH_LOG_ERROR, SWITCH_LOG_INFO, switch_log_printf(), SWITCH_ODBC_FAIL, switch_odbc_handle_connect(), switch_odbc_handle_get_error(), SWITCH_ODBC_STATE_CONNECTED, SWITCH_ODBC_STATE_DOWN, SWITCH_ODBC_SUCCESS, switch_safe_free, SWITCH_STACK_BOTTOM, SWITCH_STATUS_SUCCESS, switch_str_nil, SWITCH_TRUE, and switch_yield.
Referenced by switch_odbc_handle_connect(), and switch_odbc_handle_destroy().
switch_odbc_status_t switch_odbc_handle_exec | ( | switch_odbc_handle_t * | handle, |
const char * | sql, | ||
switch_odbc_statement_handle_t * | rstmt, | ||
char ** | err | ||
) |
Definition at line 456 of file switch_odbc.c.
References SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, switch_log_printf(), SWITCH_ODBC_FAIL, switch_odbc_handle_get_error(), SWITCH_ODBC_SUCCESS, switch_str_nil, switch_stristr(), and zstr.
Referenced by switch_cache_db_execute_sql_real(), switch_cache_db_test_reactive_ex(), and switch_odbc_handle_exec_string().
switch_odbc_status_t switch_odbc_handle_exec_string | ( | switch_odbc_handle_t * | handle, |
const char * | sql, | ||
char * | resbuf, | ||
size_t | len, | ||
char ** | err | ||
) |
Definition at line 412 of file switch_odbc.c.
References name, SWITCH_ODBC_FAIL, switch_odbc_handle_exec(), switch_odbc_statement_handle_free(), and SWITCH_ODBC_SUCCESS.
Referenced by switch_cache_db_execute_sql2str().
char* switch_odbc_handle_get_error | ( | switch_odbc_handle_t * | handle, |
switch_odbc_statement_handle_t | stmt | ||
) |
Definition at line 780 of file switch_odbc.c.
References buffer, length, and switch_mprintf().
Referenced by switch_odbc_handle_callback_exec_detailed(), switch_odbc_handle_connect(), switch_odbc_handle_disconnect(), and switch_odbc_handle_exec().
switch_odbc_state_t switch_odbc_handle_get_state | ( | switch_odbc_handle_t * | handle | ) |
Definition at line 771 of file switch_odbc.c.
References SWITCH_ODBC_STATE_ERROR, and SWITCH_ODBC_STATE_INIT.
switch_odbc_handle_t* switch_odbc_handle_new | ( | const char * | dsn, |
const char * | username, | ||
const char * | password | ||
) |
Definition at line 72 of file switch_odbc.c.
References DEFAULT_ODBC_RETRIES, memset(), SWITCH_ODBC_STATE_INIT, and switch_safe_free.
Referenced by _switch_cache_db_get_db_handle().
void switch_odbc_set_num_retries | ( | switch_odbc_handle_t * | handle, |
int | num_retries | ||
) |
Definition at line 117 of file switch_odbc.c.
void switch_odbc_skip_autocommit_flip | ( | void | ) |
Definition at line 67 of file switch_odbc.c.
References skip_autocommit_flip.
Referenced by switch_load_core_config().
switch_odbc_status_t switch_odbc_SQLEndTran | ( | switch_odbc_handle_t * | handle, |
switch_bool_t | commit | ||
) |
Definition at line 835 of file switch_odbc.c.
References SWITCH_FALSE.
Referenced by do_trans(), switch_cache_db_persistant_execute_trans_full(), and switch_core_sqldb_start().
switch_odbc_status_t switch_odbc_SQLSetAutoCommitAttr | ( | switch_odbc_handle_t * | handle, |
switch_bool_t | on | ||
) |
Definition at line 818 of file switch_odbc.c.
References skip_autocommit_flip, SWITCH_FALSE, and SWITCH_ODBC_SUCCESS.
Referenced by do_trans(), switch_cache_db_persistant_execute_trans_full(), and switch_core_sqldb_start().
switch_odbc_status_t switch_odbc_statement_handle_free | ( | switch_odbc_statement_handle_t * | stmt | ) |
Definition at line 328 of file switch_odbc.c.
References SWITCH_ODBC_FAIL, and SWITCH_ODBC_SUCCESS.
Referenced by switch_odbc_handle_exec_string().
uint8_t skip_autocommit_flip = 0 |
Definition at line 65 of file switch_odbc.c.
Referenced by switch_odbc_skip_autocommit_flip(), and switch_odbc_SQLSetAutoCommitAttr().