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
Clarify if 'clearing the collection' affects only client, or client+server #114
Comments
Currently In order to remove all items on the server, so far there is no way to do it from kinto.js. It can be done on the API using a What would you suggest to implement this ? Adding a |
I my opinion, |
Instead, to be consistent with remote API, I would suggest to have a bulk delete method on the collection (with same params as collection.delete({filters: {complete: true}) |
For me, having |
Oh, another thing that surprised me just now is that if I call |
Work-around to 'flush the cache' on a collection is to call |
That's probably a bug. Also, I don't think it's a good idea to wipe data on the server when |
While pairing with @ametaireau, we discovered than after |
Yeah, that was probably what caused the behavior that surprised me. |
Fixes #114: Drop collection metas on #clear().
Sometimes I will want to remove all the items from the collection on the server.
Other times (actually, probably only when debugging, or maybe when offline and offering the user something like
git checkout -- .
to discard unpushed changes), I only want to flush the cache, to make sync start from zero.It is not clear to me which one of these two is done by http://kintojs.readthedocs.org/en/latest/api/#clearing-the-collection
The text was updated successfully, but these errors were encountered: