|
|
@@ -177,7 +177,7 @@ - (FMDatabase*)database {
|
|
|
return _db;
|
|
|
}
|
|
|
|
|
|
-- (void)inDatabase:(void (^)(FMDatabase *db))block {
|
|
|
+- (void)inDatabase:(__attribute__((noescape)) void (^)(FMDatabase *db))block {
|
|
|
#ifndef NDEBUG
|
|
|
/* Get the currently executing queue (which should probably be nil, but in theory could be another DB queue
|
|
|
* and then check it against self to make sure we're not about to deadlock. */
|
|
|
@@ -240,23 +240,23 @@ - (void)beginTransaction:(FMDBTransaction)transaction withBlock:(void (^)(FMData
|
|
|
FMDBRelease(self);
|
|
|
}
|
|
|
|
|
|
-- (void)inTransaction:(void (^)(FMDatabase *db, BOOL *rollback))block {
|
|
|
+- (void)inTransaction:(__attribute__((noescape)) void (^)(FMDatabase *db, BOOL *rollback))block {
|
|
|
[self beginTransaction:FMDBTransactionExclusive withBlock:block];
|
|
|
}
|
|
|
|
|
|
-- (void)inDeferredTransaction:(void (^)(FMDatabase *db, BOOL *rollback))block {
|
|
|
+- (void)inDeferredTransaction:(__attribute__((noescape)) void (^)(FMDatabase *db, BOOL *rollback))block {
|
|
|
[self beginTransaction:FMDBTransactionDeferred withBlock:block];
|
|
|
}
|
|
|
|
|
|
-- (void)inExclusiveTransaction:(void (^)(FMDatabase *db, BOOL *rollback))block {
|
|
|
+- (void)inExclusiveTransaction:(__attribute__((noescape)) void (^)(FMDatabase *db, BOOL *rollback))block {
|
|
|
[self beginTransaction:FMDBTransactionExclusive withBlock:block];
|
|
|
}
|
|
|
|
|
|
-- (void)inImmediateTransaction:(void (^)(FMDatabase * _Nonnull, BOOL * _Nonnull))block {
|
|
|
+- (void)inImmediateTransaction:(__attribute__((noescape)) void (^)(FMDatabase * _Nonnull, BOOL * _Nonnull))block {
|
|
|
[self beginTransaction:FMDBTransactionImmediate withBlock:block];
|
|
|
}
|
|
|
|
|
|
-- (NSError*)inSavePoint:(void (^)(FMDatabase *db, BOOL *rollback))block {
|
|
|
+- (NSError*)inSavePoint:(__attribute__((noescape)) void (^)(FMDatabase *db, BOOL *rollback))block {
|
|
|
#if SQLITE_VERSION_NUMBER >= 3007000
|
|
|
static unsigned long savePointIdx = 0;
|
|
|
__block NSError *err = 0x00;
|