|
|
@@ -890,6 +890,28 @@ int main (int argc, const char * argv[]) {
|
|
|
}];
|
|
|
}
|
|
|
|
|
|
+ {
|
|
|
+
|
|
|
+
|
|
|
+ [queue inDatabase:^(FMDatabase *adb) {
|
|
|
+ [adb executeUpdate:@"create table colNameTest (a, b, c, d)"];
|
|
|
+ FMDBQuickCheck([adb executeUpdate:@"insert into colNameTest values (1, 2, 3, 4)"]);
|
|
|
+
|
|
|
+ FMResultSet *ars = [adb executeQuery:@"select * from colNameTest"];
|
|
|
+
|
|
|
+ NSDictionary *d = [ars columnNameToIndexMap];
|
|
|
+ FMDBQuickCheck([d count] == 4);
|
|
|
+
|
|
|
+ FMDBQuickCheck([[d objectForKey:@"a"] intValue] == 0);
|
|
|
+ FMDBQuickCheck([[d objectForKey:@"b"] intValue] == 1);
|
|
|
+ FMDBQuickCheck([[d objectForKey:@"c"] intValue] == 2);
|
|
|
+ FMDBQuickCheck([[d objectForKey:@"d"] intValue] == 3);
|
|
|
+
|
|
|
+ [ars close];
|
|
|
+
|
|
|
+ }];
|
|
|
+
|
|
|
+ }
|
|
|
|
|
|
|
|
|
{
|
|
|
@@ -1214,7 +1236,7 @@ void testPool(NSString *dbPath) {
|
|
|
|
|
|
size_t ops = 128;
|
|
|
|
|
|
- dispatch_queue_t dqueue = dispatch_get_global_queue(0, DISPATCH_QUEUE_PRIORITY_HIGH);
|
|
|
+ dispatch_queue_t dqueue = dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0);
|
|
|
|
|
|
dispatch_apply(ops, dqueue, ^(size_t nby) {
|
|
|
|
|
|
@@ -1249,7 +1271,7 @@ void testPool(NSString *dbPath) {
|
|
|
|
|
|
int ops = 16;
|
|
|
|
|
|
- dispatch_queue_t dqueue = dispatch_get_global_queue(0, DISPATCH_QUEUE_PRIORITY_HIGH);
|
|
|
+ dispatch_queue_t dqueue = dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0);
|
|
|
|
|
|
dispatch_apply(ops, dqueue, ^(size_t nby) {
|
|
|
|