How do I start an transaction in sqlite in my iPhone application. I have a migration file with sql queries and I need them to be executed as one atomical transaction. If something failes I will rollback, but I could need some guidiance on how I do that.
Share
Start a transaction with:
sqlite3_exec(db, "BEGIN", 0, 0, 0);Commit a transaction with:
sqlite3_exec(db, "COMMIT", 0, 0, 0);Rollback a transaction with:
sqlite3_exec(db, "ROLLBACK", 0, 0, 0);