FreeSWITCH API Documentation
1.7.0
|
#include <switch.h>
Go to the source code of this file.
switch_bool_t switch_odbc_available | ( | void | ) |
Definition at line 738 of file switch_odbc.c.
References SWITCH_FALSE, and SWITCH_TRUE.
Referenced by _switch_cache_db_get_db_handle(), and switch_load_core_config().
int switch_odbc_handle_affected_rows | ( | switch_odbc_handle_t * | handle | ) |
Definition at line 729 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 540 of file switch_odbc.c.
References memset(), switch_assert, SWITCH_CHANNEL_ID_LOG, SWITCH_LOG_ERROR, switch_log_printf(), SWITCH_ODBC_FAIL, switch_odbc_handle_get_error(), SWITCH_ODBC_SUCCESS, switch_str_nil, and zstr.
switch_odbc_status_t switch_odbc_handle_connect | ( | switch_odbc_handle_t * | handle | ) |
Definition at line 336 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().
void switch_odbc_handle_destroy | ( | switch_odbc_handle_t ** | handlep | ) |
Definition at line 671 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 119 of file switch_odbc.c.
References SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG10, SWITCH_LOG_ERROR, switch_log_printf(), SWITCH_ODBC_FAIL, SWITCH_ODBC_STATE_CONNECTED, SWITCH_ODBC_STATE_DOWN, and SWITCH_ODBC_SUCCESS.
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 449 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(), 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 405 of file switch_odbc.c.
References 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 709 of file switch_odbc.c.
References switch_mprintf().
Referenced by switch_odbc_handle_callback_exec_detailed(), switch_odbc_handle_connect(), and switch_odbc_handle_exec().
switch_odbc_state_t switch_odbc_handle_get_state | ( | switch_odbc_handle_t * | handle | ) |
Definition at line 700 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 65 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 110 of file switch_odbc.c.
switch_odbc_status_t switch_odbc_SQLEndTran | ( | switch_odbc_handle_t * | handle, |
switch_bool_t | commit | ||
) |
Definition at line 760 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 747 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_statement_handle_free | ( | switch_odbc_statement_handle_t * | stmt | ) |
Definition at line 321 of file switch_odbc.c.
References SWITCH_ODBC_FAIL, and SWITCH_ODBC_SUCCESS.
Referenced by switch_odbc_handle_exec_string().