-
Notifications
You must be signed in to change notification settings - Fork 0
Deleting Rows
cmancushman edited this page Oct 26, 2017
·
2 revisions
When querying for rows, StackBaseCondition objects are often used to help refine results. To understand these better, take a look at the docs for StackBaseCondition.
Declaration
-(void)deleteRowsThatSatisfyTheCondition:(StackBaseCondition *)condition completionBlock:(StackBaseEditCompletion) compBlock;Example
[weakSelf.table deleteRowsThatSatisfyTheCondition:[StackBaseCondition columnWithName:@"id" isEqualTo:@3]
completionBlock:^(BOOL success, NSString *responseMessage) {
if(success){
NSLog(@"Update Successful.");
}else{
NSLog(@"Update Unsuccessful: %@", responseMessage);
}
}];Note
When passing numeric values into rows (@"example_numeric_field" : @4) or conditions ([StackBaseCondition columnWithName:@"id" isEqualTo:@1]), the numbers must be formatted as NSNumbers or be prefixed with '@' in order to be processed by the backend.
Declaration
-(void)deleteAllRowsWithCompletionBlock:(StackBaseEditCompletion) compBlock;Example
[weakSelf.table deleteAllRowsWithCompletionBlock:^(BOOL success, NSString *responseMessage) {
if(success){
NSLog(@"Operation Successful.");
}else{
NSLog(@"Operation Unsuccessful %@", responseMessage);
}
}];Intro
Managing Tables
Managing Columns
Managing Rows
Conditions
Going Forward