Compare commits

...

2 Commits

Author SHA1 Message Date
370294ddb8 fix get_nth_id sql 2023-08-03 14:32:52 +02:00
e8f3cf6014 partial fix tab/space inconsistency 2023-08-03 14:32:36 +02:00
2 changed files with 6 additions and 7 deletions

View File

@ -30,8 +30,7 @@ static const char dump_stmt[] =
static sqlite3_stmt* get_nth_id_stmt; static sqlite3_stmt* get_nth_id_stmt;
static const char get_nth_id_stmt_template[] = static const char get_nth_id_stmt_template[] =
"SELECT rowid " "SELECT rowid "
"FROM projects " "FROM project "
"WHERE" "LIMIT 1 "
"LIMIT 1 " "OFFSET ?;"
"OFFSET ?;"
; ;

View File

@ -35,17 +35,17 @@ api_init(void)
DBERR(sqlite3_open(DBFILE, &connection)); DBERR(sqlite3_open(DBFILE, &connection));
DBERR(stmt_prepare(remind_stmt)); DBERR(stmt_prepare(remind_stmt));
DBERR(stmt_prepare(set_repo_stmt)); DBERR(stmt_prepare(set_repo_stmt));
DBERR(stmt_prepare(get_nth_id_stmt)); DBERR(stmt_prepare(get_nth_id_stmt));
return 0; return 0;
} }
DECL void DECL void
api_rope(void) api_rope(void)
{ {
DBERR(sqlite3_finalize(remind_stmt)); DBERR(sqlite3_finalize(remind_stmt));
DBERR(sqlite3_finalize(set_repo_stmt)); DBERR(sqlite3_finalize(set_repo_stmt));
DBERR(sqlite3_finalize(get_nth_id_stmt)); DBERR(sqlite3_finalize(get_nth_id_stmt));
sqlite3_close(connection); sqlite3_close(connection);
} }
DECL void DECL void