transactionSync<T> method
Implementation
T transactionSync<T>(T Function(Database) func) {
this.execute("BEGIN TRANSACTION");
try {
final val = func(this);
this.execute("COMMIT");
return val;
} catch (e) {
this.execute("ROLLBACK");
throw Exception("sqlite transaction failed: $e");
}
}