【问题标题】:In Parse Local Datastore, how can I perform a query for any pin name?在 Parse Local Datastore 中,如何查询任何 pin 名称?
【发布时间】:2015-04-02 17:06:33
【问题描述】:
每当您固定一个对象时,该对象总是隐式或显式([object pin*] 与 [object pin*WithName:@"pin name"],其中 * 是可选的 InBackground)与固定名称相关联 - 默认情况下为 PFObjectPinName 或用户提供的引脚名称。
查询时,类似地,您可以隐式或显式提供要查询的引脚名称。但是,我想知道本地存储的所有对象,而不必知道系统上的所有引脚名称。
我怎样才能做到这一点?
【问题讨论】:
标签:
parse-platform
pinning
local-datastore
【解决方案1】:
我想查询任何密码,只需使用fromLocalDatastore。它的 cmets 说:
/*!
@abstract Change the source of this query to all pinned objects.
@warning Requires Local Datastore to be enabled.
@returns The same instance of `PFQuery` as the receiver. This allows method chaining.
@see cachePolicy
*/
- (instancetype)fromLocalDatastore;