Page 1 of 2

Delete multiple objects from DB

Posted: Sun Apr 28, 2013 1:08 pm
by Janko

Hi,

Is there a way of deleting multiple objects in Appery DB?

Like "delete all objects from collection X older than a certain date"?

Thanks Bye Marco.


Delete multiple objects from DB

Posted: Sun Apr 28, 2013 1:14 pm
by Igor

Hi,

Do you want remove objects manually or with Backend Service?


Delete multiple objects from DB

Posted: Sun Apr 28, 2013 1:15 pm
by Janko

HI Igor,

Actually, both are interesting to me.

Thanks.


Delete multiple objects from DB

Posted: Sun Apr 28, 2013 1:48 pm
by Igor

You can delete multiple objects manually and with Backend Service.
Manualy you can create query in collection.
From app you should make a query, save result to local storage variable, and call rest service for each saved object_id .

Look at tutorial http://docs.appery.io/documentation/b...


Delete multiple objects from DB

Posted: Mon Apr 29, 2013 7:45 am
by Janko

Thanks...
I suspected this ... bad news actually.. It means if i have to delete 1000 objects it will count 1000 calls to your DB.
Not really convenient...

Also as to the manual method, did iI get it right that I would have to run a query and then manually select objects in group of 5 (the pagination works in group of 5 in the User Interface ) and delete them?
Will this count transactions on the DB?

Thanks. Bye. Marco.


Delete multiple objects from DB

Posted: Mon Apr 29, 2013 11:43 am
by maxkatz

When working via the admin console, those requests are not counted.


Delete multiple objects from DB

Posted: Sun Mar 09, 2014 5:22 pm
by Tom6106181

I also need this functionality for a PURGE function for my app, purging old items from my collection;

official docs;
http://docs.mongodb.org/manual/refere...

suggestion based on date
http://stackoverflow.com/questions/18...

would really like to see this Method in the services.


Delete multiple objects from DB

Posted: Thu Mar 20, 2014 12:10 am
by maxkatz

Added to our todo list.


Delete multiple objects from DB

Posted: Thu Mar 20, 2014 7:29 am
by Tom6106181

Any ETA?


Delete multiple objects from DB

Posted: Thu Mar 20, 2014 3:56 pm
by Fred McIntyre

Adding the remove() method would be really helpful. If you do, please allow the option to use it with no parameters, to remove all rows from a collection, as well as with a query. Thank you.