Core Data player statistics

Hi

I’m trying to build a little page of stats. Just 5 or 6 and I’m wondering whats the best way to go about it. In a web development environment, Id just have some SQL procedures to call and either return the data into a var or return raw data and process it in the model.

What I’m trying is the following:

    func getCoreDataObjects() -> NSPersistentStoreResult? {
    let fetch = NSFetchRequest<GameRecord>(entityName: "GameRecord")
    do {
         return try managedObjectContext.execute(fetch)
    } catch {
        return nil
    }
}

I’m printing the result of this call using print(result!)and getting <NSAsynchronousFetchResult: 0x608000280a00>. This doesn’t seem to be what I’m after. So I’m wondering what the proper way to achieve this would be? :slight_smile: