Ponting
Ponting

Reputation: 2246

How to delete rows of table in data browser of Parse(Parse.com) programatically in objective c from xcode

I am developing chat application in objective c in XCode. So when chat message count reaches 100 then i want to delete rows of table in database of parse.com. So how can i do this programatically? From code i am using PFQuery object to insert data as below.

 // Initialize parse query with classname 'chatroom'
PFQuery *query = [PFQuery queryWithClassName:className];

chatData  = [[NSMutableArray alloc] init];
NSArray *array = [NSArray arrayWithObjects:Sender,receiver,nil];

// set query to retrieve table data which contain specific senderId and recieverId from parse table 'chatroom'
[query whereKey:SET_SENDER containedIn:array];
[query whereKey:SET_RECEIVER containedIn:array];

Any help will be appreciated.

Upvotes: 1

Views: 2805

Answers (1)

Ponting
Ponting

Reputation: 2246

I am using deleteInBackground property to delete record from Parse Table.

eg. deleteObjectId is defined Parse object.

[deleteObjectId deleteInBackground];  

Upvotes: 1

Related Questions