[self release];
return nil;
}
+ dbLock = [[NSRecursiveLock alloc] init];
}
return self;
}
- (void)dealloc {
+ [dbLock release];
if (sqlite3_close(db) != SQLITE_OK) {
ITDebugLog(@"%@ sqlite3_close(0x%x): %@", ITDebugErrorPrefixForObject(self), db, [NSString stringWithUTF8String:sqlite3_errmsg(db)]);
}
va_list args;
va_start(args, query);
+ [dbLock lock];
BOOL result = [self executeQuery:query va_args:args];
+ [dbLock unlock];
va_end(args);
return result;
va_list args;
va_start(args, query);
+ [dbLock lock];
id result = [self fetchRow:query va_args:args];
+ [dbLock unlock];
va_end(args);
return result;
va_list args;
va_start(args, query);
+ [dbLock lock];
id result = [self fetchTable:query va_args:args];
+ [dbLock unlock];
va_end(args);
return result;