implement dump
This commit is contained in:
parent
ebd8918966
commit
40f014c432
@ -22,3 +22,7 @@ static const char set_repo_stmt_template[] =
|
||||
"repo_link = ? "
|
||||
"WHERE who = ?;"
|
||||
;
|
||||
|
||||
static const char dump_stmt[] =
|
||||
"SELECT * FROM project;"
|
||||
;
|
||||
|
@ -115,6 +115,14 @@ rtos(void* data,
|
||||
}
|
||||
|
||||
DECL char *
|
||||
dump(){
|
||||
char* errmsg;
|
||||
char* r = (char*)calloc(sizeof(char), 10000); // TODO: allow for reallocing in rtos, start with a smaller value
|
||||
DBERR(sqlite3_exec(connection, dump_stmt, rtos, &r, &errmsg));
|
||||
return r;
|
||||
}
|
||||
|
||||
DECL char *
|
||||
raw(const char * const sql)
|
||||
{
|
||||
char* errmsg;
|
||||
|
Reference in New Issue
Block a user