35 #ifndef SWITCH_CORE_DB_H 36 #define SWITCH_CORE_DB_H 78 #define SWITCH_CORE_DB_STATIC ((switch_core_db_destructor_type_t)0) 79 #define SWITCH_CORE_DB_TRANSIENT ((switch_core_db_destructor_type_t)-1) 484 #define SWITCH_CORE_DB_OK 0 486 #define SWITCH_CORE_DB_ERROR 1 487 #define SWITCH_CORE_DB_INTERNAL 2 488 #define SWITCH_CORE_DB_PERM 3 489 #define SWITCH_CORE_DB_ABORT 4 490 #define SWITCH_CORE_DB_BUSY 5 491 #define SWITCH_CORE_DB_LOCKED 6 492 #define SWITCH_CORE_DB_NOMEM 7 493 #define SWITCH_CORE_DB_READONLY 8 494 #define SWITCH_CORE_DB_INTERRUPT 9 495 #define SWITCH_CORE_DB_IOERR 10 496 #define SWITCH_CORE_DB_CORRUPT 11 497 #define SWITCH_CORE_DB_NOTFOUND 12 498 #define SWITCH_CORE_DB_FULL 13 499 #define SWITCH_CORE_DB_CANTOPEN 14 500 #define SWITCH_CORE_DB_PROTOCOL 15 501 #define SWITCH_CORE_DB_EMPTY 16 502 #define SWITCH_CORE_DB_SCHEMA 17 503 #define SWITCH_CORE_DB_TOOBIG 18 504 #define SWITCH_CORE_DB_CONSTRAINT 19 505 #define SWITCH_CORE_DB_MISMATCH 20 506 #define SWITCH_CORE_DB_MISUSE 21 507 #define SWITCH_CORE_DB_NOLFS 22 508 #define SWITCH_CORE_DB_AUTH 23 509 #define SWITCH_CORE_DB_FORMAT 24 510 #define SWITCH_CORE_DB_RANGE 25 511 #define SWITCH_CORE_DB_NOTADB 26 512 #define SWITCH_CORE_DB_ROW 100 513 #define SWITCH_CORE_DB_DONE 101 switch_core_db_t * handle
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
void(* switch_core_db_destructor_type_t)(void *)
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_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_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_open_v2(const char *filename, switch_core_db_t **ppDb)
int(* switch_core_db_callback_func_t)(void *pArg, int argc, char **argv, char **columnNames)
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)
int(* switch_core_db_err_callback_func_t)(void *pArg, const char *errmsg)
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)
#define SWITCH_BEGIN_EXTERN_C