FreeSWITCH API Documentation
1.7.0
|
Functions | |
switch_core_db_t * | switch_core_db_open_file (const char *filename) |
Open a core db (SQLite) file. More... | |
switch_status_t | switch_core_db_persistant_execute (switch_core_db_t *db, char *sql, uint32_t retries) |
Execute a sql stmt until it is accepted. More... | |
switch_status_t | switch_core_db_persistant_execute_trans (switch_core_db_t *db, char *sql, uint32_t retries) |
void | switch_core_db_test_reactive (switch_core_db_t *db, char *test_sql, char *drop_sql, char *reactive_sql) |
perform a test query then perform a reactive query if the first one fails More... | |
switch_core_db_t* switch_core_db_open_file | ( | const char * | filename | ) |
Open a core db (SQLite) file.
filename | the path to the db file to open |
Definition at line 198 of file switch_core_db.c.
References db_pick_path(), SWITCH_CHANNEL_LOG, switch_core_db_close(), switch_core_db_errmsg(), switch_core_db_exec(), switch_core_db_open(), SWITCH_LOG_ERROR, and switch_log_printf().
Referenced by _switch_cache_db_get_db_handle().
switch_status_t switch_core_db_persistant_execute | ( | switch_core_db_t * | db, |
char * | sql, | ||
uint32_t | retries | ||
) |
Execute a sql stmt until it is accepted.
db | the db handle |
sql | the sql to execute |
retries | the number of retries to use |
Definition at line 344 of file switch_core_db.c.
References switch_core_db_exec(), switch_core_db_free(), SWITCH_STATUS_FALSE, SWITCH_STATUS_SUCCESS, and switch_yield.
switch_status_t switch_core_db_persistant_execute_trans | ( | switch_core_db_t * | db, |
char * | sql, | ||
uint32_t | retries | ||
) |
Definition at line 273 of file switch_core_db.c.
References SWITCH_CHANNEL_LOG, switch_core_db_exec(), switch_core_db_free(), SWITCH_LOG_DEBUG, SWITCH_LOG_ERROR, switch_log_printf(), SWITCH_STATUS_FALSE, SWITCH_STATUS_SUCCESS, and switch_yield.
void switch_core_db_test_reactive | ( | switch_core_db_t * | db, |
char * | test_sql, | ||
char * | drop_sql, | ||
char * | reactive_sql | ||
) |
perform a test query then perform a reactive query if the first one fails
db | the db handle |
test_sql | the test sql |
drop_sql | the drop sql |
reactive_sql | the reactive sql |
Definition at line 230 of file switch_core_db.c.
References runtime, SCF_AUTO_SCHEMAS, SCF_CLEAR_SQL, SWITCH_CHANNEL_LOG, switch_core_db_exec(), switch_core_db_free(), SWITCH_LOG_DEBUG, switch_log_printf(), and switch_test_flag.