Why Is This FMDB Enqueue Block Not Executing?

70 Views Asked by At

I've created this method in my iOS to call to FMDatabaseQueue:

-(void) enqueueSelectStatement:(NSString*)selectStatement withArguments:(NSArray*)args {
            
    NSLog(@"Checkpoint 1");
            
            
    [self.dbQueue inDatabase:^(FMDatabase *db) {
                   
        FMResultSet *result = [db executeQuery:selectStatement withArgumentsInArray:args];
                    
        NSLog(@"Checkpoint 2");

    }];
            
                
    NSLog(@"Checkpoint 3");
           
}

When I call this method with:

NSString *query = @"SELECT * FROM mytable WHERE id = ?";

[self enqueueSelectStatement:query withArguments:@[1]];

I get Checkpoint 1 in my terminal output, but nothing else. The app does not crash and continues to run, but the method/block apparently dies after Checkpoint 1

Is the method just stopping, and if so, why?

0

There are 0 best solutions below