RTS API Documentation
1.10.11
|
Functions | |
switch_core_db_t * | switch_core_db_open_file (const char *filename) |
Open a core db (SQLite) file. More... | |
switch_core_db_t * | switch_core_db_open_in_memory (const char *uri) |
Open a core db (SQLite) in-memory. 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 230 of file switch_core_db.c.
References db_pick_path(), path, SWITCH_CHANNEL_LOG, switch_core_db_close(), switch_core_db_connection_setup(), switch_core_db_errmsg(), switch_core_db_open(), SWITCH_FALSE, SWITCH_LOG_ERROR, and switch_log_printf().
Referenced by _switch_cache_db_get_db_handle().
switch_core_db_t* switch_core_db_open_in_memory | ( | const char * | uri | ) |
Open a core db (SQLite) in-memory.
uri | to the db to open |
Definition at line 253 of file switch_core_db.c.
References SWITCH_CHANNEL_LOG, switch_core_db_close(), switch_core_db_connection_setup(), switch_core_db_errmsg(), switch_core_db_open_v2(), SWITCH_LOG_ERROR, switch_log_printf(), and SWITCH_TRUE.
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 388 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 317 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 274 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.