[英]Is query.fromLocalDatastore() exclusive?
When you add .fromLocalDatastore
to a PFQuery
, does it query exclusively the local datastore, or does it query the cloud as well? 将
.fromLocalDatastore
添加到PFQuery
,它是否仅查询本地数据存储,还是也查询云?
From Parse: 从解析:
Often, you'll want to find a whole list of objects that match certain criteria, instead of getting a single object by id.
通常,您会希望查找符合特定条件的对象的完整列表,而不是通过id获得单个对象。 To do that, you can use a PFQuery.
为此,您可以使用PFQuery。 Any PFQuery can be used with the local datastore just as with the network.
如同网络一样,任何PFQuery都可以与本地数据存储一起使用。 The results will include any object you have pinned that matches the query .
结果将包括您固定的与查询匹配的任何对象 。
A PFQuery
query using .fromLocalDatastore() does not hit the cloud. 使用.fromLocalDatastore()的
PFQuery
查询不会打云。
The reason is that is its behavior by definition but I also verified this to be true through network monitoring of a query both with and without the use of .fromLocalDatastore(). 原因是它的行为符合定义,但我也通过对使用和不使用.fromLocalDatastore()的查询进行网络监视来验证这是正确的。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.