35 #ifndef SWITCH_CORE_DB_H
36 #define SWITCH_CORE_DB_H
72 #define SWITCH_CORE_DB_STATIC ((switch_core_db_destructor_type_t)0)
73 #define SWITCH_CORE_DB_TRANSIENT ((switch_core_db_destructor_type_t)-1)
472 #define SWITCH_CORE_DB_OK 0
474 #define SWITCH_CORE_DB_ERROR 1
475 #define SWITCH_CORE_DB_INTERNAL 2
476 #define SWITCH_CORE_DB_PERM 3
477 #define SWITCH_CORE_DB_ABORT 4
478 #define SWITCH_CORE_DB_BUSY 5
479 #define SWITCH_CORE_DB_LOCKED 6
480 #define SWITCH_CORE_DB_NOMEM 7
481 #define SWITCH_CORE_DB_READONLY 8
482 #define SWITCH_CORE_DB_INTERRUPT 9
483 #define SWITCH_CORE_DB_IOERR 10
484 #define SWITCH_CORE_DB_CORRUPT 11
485 #define SWITCH_CORE_DB_NOTFOUND 12
486 #define SWITCH_CORE_DB_FULL 13
487 #define SWITCH_CORE_DB_CANTOPEN 14
488 #define SWITCH_CORE_DB_PROTOCOL 15
489 #define SWITCH_CORE_DB_EMPTY 16
490 #define SWITCH_CORE_DB_SCHEMA 17
491 #define SWITCH_CORE_DB_TOOBIG 18
492 #define SWITCH_CORE_DB_CONSTRAINT 19
493 #define SWITCH_CORE_DB_MISMATCH 20
494 #define SWITCH_CORE_DB_MISUSE 21
495 #define SWITCH_CORE_DB_NOLFS 22
496 #define SWITCH_CORE_DB_AUTH 23
497 #define SWITCH_CORE_DB_FORMAT 24
498 #define SWITCH_CORE_DB_RANGE 25
499 #define SWITCH_CORE_DB_NOTADB 26
500 #define SWITCH_CORE_DB_ROW 100
501 #define SWITCH_CORE_DB_DONE 101
void switch_core_db_free_table(char **result)
const char * switch_core_db_errmsg(switch_core_db_t *db)
char * switch_sql_concat(void)
int switch_core_db_get_table(switch_core_db_t *db, const char *sql, char ***resultp, int *nrow, int *ncolumn, char **errmsg)
#define SWITCH_END_EXTERN_C
const char * switch_core_db_column_name(switch_core_db_stmt_t *stmt, int N)
int switch_core_db_close(switch_core_db_t *db)
int(* switch_core_db_callback_func_t)(void *pArg, int argc, char **argv, char **columnNames)
int switch_core_db_finalize(switch_core_db_stmt_t *pStmt)
int switch_core_db_step(switch_core_db_stmt_t *stmt)
int switch_core_db_exec(switch_core_db_t *db, const char *sql, switch_core_db_callback_func_t callback, void *data, char **errmsg)
int(* switch_core_db_err_callback_func_t)(void *pArg, const char *errmsg)
int switch_core_db_bind_text(switch_core_db_stmt_t *pStmt, int i, const char *zData, int nData, switch_core_db_destructor_type_t xDel)
int switch_core_db_load_extension(switch_core_db_t *db, const char *extension)
int switch_core_db_reset(switch_core_db_stmt_t *pStmt)
int switch_core_db_bind_double(switch_core_db_stmt_t *pStmt, int i, double dValue)
int64_t switch_core_db_last_insert_rowid(switch_core_db_t *db)
struct sqlite3 switch_core_db_t
int switch_core_db_open(const char *filename, switch_core_db_t **ppDb)
void switch_core_db_free(char *z)
struct sqlite3_stmt switch_core_db_stmt_t
int switch_core_db_changes(switch_core_db_t *db)
int switch_core_db_column_count(switch_core_db_stmt_t *pStmt)
const unsigned char * switch_core_db_column_text(switch_core_db_stmt_t *stmt, int iCol)
int switch_core_db_bind_int64(switch_core_db_stmt_t *pStmt, int i, int64_t iValue)
int switch_core_db_prepare(switch_core_db_t *db, const char *zSql, int nBytes, switch_core_db_stmt_t **ppStmt, const char **pzTail)
int switch_core_db_bind_int(switch_core_db_stmt_t *pStmt, int i, int iValue)
void(* switch_core_db_destructor_type_t)(void *)
#define SWITCH_BEGIN_EXTERN_C