0
這是我的查詢將返回我的所有用戶在數據存儲:如何在GTLQuery上設置查詢限制?
func getAllUsers(){
let query = GTLQueryUser.queryForUserList()
service.executeQuery(query, completionHandler: {(ticket, response, error) -> Void in
if error != nil {
print(error)
}
else{
let userCollection = response as! GTLUserCollection
if let newUsers = userCollection.items() as? [GTLUserUser]{
users = newUsers
print("These are the users that are in data store")
for user in users{
print (user.firstName)
}
}
}
})
}
如何設置查詢限制到一個讓我可以在同一時間只有一個查詢用戶?