简体   繁体   English

Parse.com Android:我可以固定到本地数据存储的ParseObjects数量?

[英]Parse.com Android: Number of ParseObjects I can pin to the Local Datastore?

I'm building an Android health & fitness app and would like to store some health data. 我正在构建一个Android健康与​​健身应用程序,并希望存储一些健康数据。

To be able to use the app without internet connection I'm using the Parse Local Datastore exactly as described here: https://parse.com/docs/android_guide#localdatastore-caching 为了能够在没有互联网连接的情况下使用该应用,我正在完全按照此处的说明使用“解析本地数据存储”: https : //parse.com/docs/android_guide#localdatastore-caching

Everything works fine as long I have less then 100 ParseObjects pinned to the Local Datastore. 只要我将少于100个ParseObjects固定到本地数据存储区,一切就可以正常工作。 If I have more ParseObjects, only the first 100 will be loaded. 如果我有更多的ParseObject,则只会加载前100个。

So I would like to know if there's a way to increase the maximum number of ParseObjects I can pin to the Local Datastore or some kind of workaround? 所以我想知道是否有办法增加我可以固定到本地数据存储区的ParseObject的最大数量或某种解决方法?

I just found out that a query on the Local Datastore has the same limitations as a query on the network. 我刚刚发现,本地数据存储区上的查询与网络上的查询具有相同的限制。

Therefore you can set the maximum limit to 1000 with: 因此,您可以使用以下方法将最大限制设置为1000:

parseQuery.setLimit(1000); // limit to at most 1000 results

If you want to query for more than 1000 ParseObjects, you can follow this answer: https://stackoverflow.com/a/18696377/954811 (it works the same on Local Datastore). 如果要查询1000个以上的ParseObject,可以遵循以下答案: https : //stackoverflow.com/a/18696377/954811 (在本地数据存储区上的作用相同)。

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

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