From ad68bbd4122683ac1ac00ebfeea6cdcfaae40777 Mon Sep 17 00:00:00 2001 From: "C. McEnroe" Date: Thu, 5 Dec 2019 11:22:42 -0500 Subject: Import in one transaction per file --- database.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'database.h') diff --git a/database.h b/database.h index 3247fee..038ce70 100644 --- a/database.h +++ b/database.h @@ -94,6 +94,16 @@ static inline sqlite3 *dbFind(int flags) { return NULL; } +static inline void dbBegin(sqlite3 *db) { + int error = sqlite3_exec(db, "BEGIN TRANSACTION;", NULL, NULL, NULL); + if (error) errx(EX_SOFTWARE, "sqlite3_exec: %s", sqlite3_errmsg(db)); +} + +static inline void dbCommit(sqlite3 *db) { + int error = sqlite3_exec(db, "COMMIT TRANSACTION;", NULL, NULL, NULL); + if (error) errx(EX_SOFTWARE, "sqlite3_exec: %s", sqlite3_errmsg(db)); +} + static inline sqlite3_stmt * dbPrepare(sqlite3 *db, unsigned flags, const char *sql) { sqlite3_stmt *stmt; -- cgit 1.4.1 table class='tabs'> summary refs log tree commit diff
path: root/etc/CodeQWERTY.bundle/Contents/Resources (unfollow)
Commit message (Expand)Author
2024-10-07Add photos from September 28June McEnroe
2024-10-07Add photos from September 22June McEnroe
2024-09-25Add photos from September 15June McEnroe
2024-09-24Add photos from September 14June McEnroe
2024-09-24Add photos from September 12June McEnroe
2024-09-24Add photos from September 7June McEnroe
2024-09-24Allow not having descriptionsJune McEnroe
2024-09-23Automatically select the last used lens for a bodyJune McEnroe
2024-09-19Add photos from September 5June McEnroe
2024-09-15Add some more film stocks to the listJune McEnroe
2024-09-13Add photos from September 2June McEnroe
2024-09-13Add Fomapan 200 to films listJune McEnroe
2024-09-10Add August 29 picnic photosJune McEnroe
2024-09-08Apply some bold to trips renderingJune McEnroe
2024-09-08Render trips hopefully more efficientlyJune McEnroe
2024-09-08Allow removing bodies and lensesJune McEnroe
2024-09-08Limit body width so it looks less silly on desktopJune McEnroe
2024-09-07Handle no film being loadedJune McEnroe
2024-09-07Fancy up the text a littleJune McEnroe