ios - 如何在解析中检索单列数据?

标签 ios swift parse-platform

我在 Parse 中创建了一个名为 gameScore 的类,并向其中添加了几列,如下所示。

var gameScore = PFObject(className:"GameScore")
gameScore["score"] = 1337
gameScore["playerName"] = "Sean Plott"
gameScore.saveInBackground()

同样,我已经添加了 10 个玩家的名字和他们的分数,现在我想要获取所有的玩家名字。 我的意思是我只想检索 playerName 列。

谁能告诉我怎么做!!!``

最佳答案

为您的 GameScore 创建一个 PFQuery 并使用 selectKeys: 指定只返回 playerName

这不会改变将在任何响应中返回的最大玩家数量...

关于ios - 如何在解析中检索单列数据?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27847926/

相关文章:

ios - 按顺序排列的 NSMutableArray - 按顺序替换中断

ios - 如何从 Dynamic NSMutableArray 添加坐标到 CLLocationCoordinate2D?

swift - 如何为 SequenceType 实现通用求和函数,其中 Generator.Element 的类型为 Int

ios - 在展开可选内容时,将 Parse PFUser 信息快速加载到 View 中失败,并发现 nil

ios - 使用未解析的标识符 'PFUser' - Swift/Xcode/Parse

ios - 无法使用 storyboardWithName 进入另一个 View

android - Ionic Cordova Web 应用程序 cookie 未存储在 Android 或 iOS 上

swift - 我需要在其路径中使用编码的前言斜杠快速创建一个 URL(没有层次意义)

ios - SwiftUI - 如何从外部 `DragGesture` 中排除内部 `simultaneousGesture` ?

parse-platform - Parse.com Arduino Yun SDK 快速入门教程不​​起作用