Reputation: 7819
I'm trying to delete some data from datastore using a query. Basically I want to delete all the Product entities except one with the Owner="x" . However the Delete function seems to accept only a Key as argument. How am I supposed to actually delete based on a query ?
Upvotes: 0
Views: 43
Reputation: 80330
First you will have to use a query to get all entities you want deleted. Use keys-only query, to minimize the cost.
Then perform batch delete, to delete multiple entities at once.
Depending on dataset size, you might need to use push Task Queue, which have 10min time limit.
Upvotes: 1