简体   繁体   English

iPhone从数据库下载数据,然后检查数据库是否已更新

[英]iphone downloading data from a database and then checking if the database has been updated

So I have an iphone app that downloads data from a shared database. 因此,我有一个iPhone应用程序,可以从共享数据库下载数据。 It switches between views and when it returns to the "data" view I'd like to download only the new data in the database. 它在视图之间切换,并在返回“数据”视图时仅在数据库中下载新数据。 What is the best way to achieve this? 实现此目标的最佳方法是什么?

Are the rows in the tables of the database unique? 数据库表中的行是否唯一? Off the top of my head, you could store the list of table row ids that you already know of then compare against that when reading the "new" rows (unless the existing rows will change their data). 在我头顶上方,您可以存储已经知道的表行ID的列表,然后与读取“新”行时的表ID进行比较(除非现有行将更改其数据)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM