Parse. Keep LocalDataStore data sync

倖福魔咒の 提交于 2019-11-30 10:56:25

In this case, I would suggest to not use a physical delete but a logical delete. Add a new Boolean column called "deleted", when you query from the device you'll get all the data and if something has been deleted, you'll know it.

You should also use a second column called "sync" to indicate that the deleted row has been updated locally and then use a background job (periodicity depends on your needs) to physically delete those rows. I think this action is important in order to safely clean your database. If you leave all your deleted rows in your database, at some point your queries might get affected in terms of speed.

I hope it helps.

Javier.

Please refer these links, These links bind parse.com webservices (bind parse classes) with local data(core data) and you can update local data with insertion and deletion of parse.com database classes records.

http://www.raywenderlich.com/15916/how-to-synchronize-core-data-with-a-web-service-part-1

http://www.raywenderlich.com/17927/how-to-synchronize-core-data-with-a-web-service-part-2

Hopefully, this will help you. :)

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!