Skip to content

Implemented PFObject.deleteAll through PFObjectBatchController. #124

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 28, 2015

Conversation

nlutsenko
Copy link
Contributor

  • Implemented PFObject.deleteAll through PFObjectBatchController
  • Tested against api.parse.com - it works beautifully
  • Way better decoupled state, as well as properly using dependency injected command runner
  • Fixed bugs around deleteAll not properly deleting objects from LDS, as well as not updating the deleted property on state

@nlutsenko
Copy link
Contributor Author

This still needs some cleanup and tests, but the implementation is about as concrete as it would get.

@nlutsenko nlutsenko added this to the 1.8.3 milestone Aug 28, 2015
@nlutsenko nlutsenko force-pushed the nlutsenko.batch.delete branch from 1240bed to 11f2392 Compare August 28, 2015 21:21
@nlutsenko
Copy link
Contributor Author

All done, waiting for you review.

NSDictionary *errorResult = result[@"error"];
NSDictionary *successResult = result[@"success"];

id<PFObjectControlling> controller = [[object class] objectController];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't we have access to the data source here? Why go through the class dispatch method.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Objects can have different object controllers, say UserController or InstallationController, where those have extra logic on top of the bare object controller.

@nlutsenko nlutsenko force-pushed the nlutsenko.batch.delete branch from 11f2392 to 6ced5df Compare August 28, 2015 21:37
@@ -172,4 +257,21 @@ - (void)testUniqueObjectsValidation {
omitObjectsWithData:YES]));
}

- (void)testUniqueObjectsUsingFilter {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's test the duplicate use case as well.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Already done.

@nlutsenko nlutsenko force-pushed the nlutsenko.batch.delete branch 2 times, most recently from 7345ccc to 3359087 Compare August 28, 2015 21:40
@nlutsenko nlutsenko force-pushed the nlutsenko.batch.delete branch from 3359087 to 69e5064 Compare August 28, 2015 21:41
nlutsenko added a commit that referenced this pull request Aug 28, 2015
Implemented PFObject.deleteAll through PFObjectBatchController.
@nlutsenko nlutsenko merged commit ce4dfe9 into master Aug 28, 2015
@nlutsenko nlutsenko deleted the nlutsenko.batch.delete branch August 28, 2015 22:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants