如何在目标c中以编码方式从Pcode中删除Parse(Parse.com)数据浏览器中的表行

时间:2022-09-07 09:37:54

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.

我正在XCode中的目标c中开发聊天应用程序。所以当聊天消息计数达到100时,我想删除parse.com数据库中的表行。那我怎么能以编程方式做到这一点呢?从代码我使用PFQuery对象插入数据如下。

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

任何帮助将不胜感激。

1 个解决方案

#1


1  

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

我正在使用deleteInBackground属性从Parse Table中删除记录。

eg. deleteObjectId is defined Parse object.

例如。 deleteObjectId是定义的Parse对象。

[deleteObjectId deleteInBackground];  

#1


1  

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

我正在使用deleteInBackground属性从Parse Table中删除记录。

eg. deleteObjectId is defined Parse object.

例如。 deleteObjectId是定义的Parse对象。

[deleteObjectId deleteInBackground];