Created
February 4, 2012 22:40
-
-
Save ccgus/1740787 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
OLD: | |
FMDatabase *db = [FMDatabase databaseWithPath:dbPath]; | |
… | |
[db executeUpdate:@"insert into namedparamtest values (:a, :b, :c, :d)" withParameterDictionary:dictionaryArgs]; | |
NEW: | |
FMDatabaseQueue *queue = [FMDatabaseQueue databaseQueueWithPath:dbPath]; | |
… | |
[queue inDatabase:^(FMDatabase *db) { | |
[db executeUpdate:@"insert into namedparamtest values (:a, :b, :c, :d)" withParameterDictionary:dictionaryArgs]; | |
}]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
(void) deleteTweetsOlderThan:(int)inMaxToKeep
{
NSArray* recent_ids = [RFTweet tweetIDsReversedForCollectionID:self.collectionID];
if ([recent_ids count] > inMaxToKeep) {
FMDatabaseQueue *queue = …
}
}