| 48 | return sqlite3_exec(db, sql, NULL, NULL, NULL); |
| 49 | } |
| 50 | static bool gd_int(sqlite3 *db, const char *sql, int64_t want) { |
| 51 | sqlite3_stmt *q=NULL; |
| 52 | bool ok=sqlite3_prepare_v2(db,sql,-1,&q,NULL)==SQLITE_OK && sqlite3_step(q)==SQLITE_ROW && |
| 53 | sqlite3_column_int64(q,0)==want && sqlite3_step(q)==SQLITE_DONE; |
| 54 | if (q && sqlite3_finalize(q)!=SQLITE_OK) ok=false; |
| 55 | return ok; |
| 56 | } |
| 57 | static bool gd_seed(sqlite3 *db, bool reverse, bool meta) { |
| 58 | static const char drop[] = "PRAGMA foreign_keys=OFF;" |
| 59 | "DROP TABLE IF EXISTS edges;DROP TABLE IF EXISTS nodes;DROP TABLE IF EXISTS file_hashes;" |
no outgoing calls
no test coverage detected