- sqlite3_stmt *stmt;
- static const char s[] =
- "insert into snapshots(name, timestamp) "
- "values (?, julianday('now'))";
- const char *tail;
-
- rc = sqlite3_prepare_v2(db, s, strlen(s), &stmt, &tail);
- if (rc != SQLITE_OK) {
- sqlite3_close(db);
- throw IOException("Error adding snapshot");
- }
-
+ sqlite3_stmt *stmt = Prepare("insert into snapshots(name, timestamp) "
+ "values (?, julianday('now'))");