Janko
Posts: 0
Joined: Tue Mar 12, 2013 11:59 pm

Delete multiple objects from DB

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.

Igor
Posts: 0
Joined: Tue Apr 02, 2013 12:05 pm

Delete multiple objects from DB

Hi,

Do you want remove objects manually or with Backend Service?

Janko
Posts: 0
Joined: Tue Mar 12, 2013 11:59 pm

Delete multiple objects from DB

HI Igor,

Actually, both are interesting to me.

Thanks.

Igor
Posts: 0
Joined: Tue Apr 02, 2013 12:05 pm

Delete multiple objects from DB

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...

Janko
Posts: 0
Joined: Tue Mar 12, 2013 11:59 pm

Delete multiple objects from DB

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.

maxkatz
Posts: 0
Joined: Fri Aug 13, 2010 3:24 pm

Delete multiple objects from DB

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

Tom6106181
Posts: 0
Joined: Fri Aug 02, 2013 12:39 pm

Delete multiple objects from DB

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.

maxkatz
Posts: 0
Joined: Fri Aug 13, 2010 3:24 pm

Delete multiple objects from DB

Added to our todo list.

Tom6106181
Posts: 0
Joined: Fri Aug 02, 2013 12:39 pm

Delete multiple objects from DB

Any ETA?

Fred McIntyre
Posts: 0
Joined: Sun Jan 12, 2014 5:04 pm

Delete multiple objects from DB

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.

Return to “Issues”