0
我检查了parse.com的quide文档,但我并不清楚。如何在Swift中使用Sql在Parse.com中“选择”
var query = PFQuery(className:"GameScore")
query.whereKey("playerName", equalTo:"Sean Plott")
query.findObjectsInBackgroundWithBlock {
(objects: [PFObject]?, error: NSError?) -> Void in
if error == nil {
// The find succeeded.
print("Successfully retrieved \(objects!.count) scores.")
// Do something with the found objects
if let objects = objects {
for object in objects {
print(object.objectId)
}
}
} else {
// Log details of the failure
print("Error: \(error!) \(error!.userInfo)")
}
}
我会试着告诉我想要用一个例子来做什么。我想 描述一个数组并将实体放入。
例如,如何将此查询的所有元素select followers from user where userid = 123
放入数组中。