Compare commits

...

2 Commits

Author SHA1 Message Date
833c8f6d17 Fixed bug in parse_args 2024-09-23 10:26:54 -07:00
37743ff684 Modified sql_gen declerations 2024-09-22 21:30:46 -07:00
2 changed files with 12 additions and 6 deletions

View File

@ -385,7 +385,7 @@ int parse_args(int argc, char** argv, filtered_tasks* task){
}
if ( argc > 4 ){
task->due_date = argv[3];
task->due_date = argv[4];
}
if ( argc > 5 ){

View File

@ -42,11 +42,17 @@ int view_all(sqlite3 *db);
void init_filtered_tasks(filtered_tasks* task);
// sql generators TODO: might be able to boil this down to 1 func
int gen_sql_update_stmt(sqlite3 *db, sqlite3_stmt** out_stmt, filtered_tasks* task);
int gen_sql_update_stmt_v2(sqlite3 *db, sqlite3_stmt** out_stmt, filtered_tasks* task);
int gen_sql_delete_stmt(sqlite3 *db, sqlite3_stmt** out_stmt, filtered_tasks* task);
int gen_sql_insert_stmt(sqlite3 *db, sqlite3_stmt** out_stmt, filtered_tasks* task, char* values);
int gen_sql_select_stmt(sqlite3 *db, sqlite3_stmt** out_stmt, filtered_tasks* task);
int prepare_sql_update_stmt(sqlite3 *db, sqlite3_stmt** out_stmt, filtered_tasks* task);
int prepare_sql_delete_stmt(sqlite3 *db, sqlite3_stmt** out_stmt, filtered_tasks* task);
int prepare_sql_insert_stmt(sqlite3 *db, sqlite3_stmt** out_stmt, filtered_tasks* task, char* values);
int prepare_sql_select_stmt(sqlite3 *db, sqlite3_stmt** out_stmt, filtered_tasks* task);
int bind_sql_update_stmt(filtered_tasks *task, int num_params, sqlite3_stmt* out_stmt);
int bind_sql_delete_stmt(filtered_tasks *task, sqlite3_stmt* out_stmt);
int bind_sql_insert_stmt(filtered_tasks *task, sqlite3_stmt* out_stmt);
int bind_sql_select_stmt(filtered_tasks *task, sqlite3_stmt* out_stmt);
// helpers
int checksqlerr(int rc, char *errmsg);