diff --git a/src/dodo.h b/src/dodo.h index 5ee437e..0e53d4a 100644 --- a/src/dodo.h +++ b/src/dodo.h @@ -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);