This repository has been archived on 2024-03-02. You can view files and clone it, but cannot push or open issues or pull requests.
probotic/include/stmt.h

37 lines
742 B
C
Raw Normal View History

2023-08-03 05:31:07 -04:00
#define stmt_prepare(stmt) \
sqlite3_prepare_v2(connection, stmt ## _template, -1, &stmt, NULL)
2023-08-02 14:55:35 -04:00
static sqlite3_stmt* remind_stmt;
static const char remind_stmt_template[] =
"SELECT "
"title,"
"body,"
"difficulty,"
"repo_link,"
"trigger_date,"
"started DATE,"
"span"
" FROM assignment INNER JOIN project on assignment.project = project.rowid "
"WHERE who = ?;"
;
2023-08-03 05:31:07 -04:00
static sqlite3_stmt* set_repo_stmt;
static const char set_repo_stmt_template[] =
"UPDATE assignment "
"SET "
"repo_link = ? "
"WHERE who = ?;"
;
2023-08-03 06:41:10 -04:00
static const char dump_stmt[] =
"SELECT * FROM project;"
;
2023-08-03 07:53:10 -04:00
static sqlite3_stmt* get_nth_id_stmt;
static const char get_nth_id_stmt_template[] =
"SELECT rowid "
2023-08-03 08:32:52 -04:00
"FROM project "
"LIMIT 1 "
"OFFSET ?;"
2023-08-03 07:53:10 -04:00
;