Sync — 2.6.1
- Improved NSPersistentContainer extension
Insert or update
persistentContainer.insertOrUpdate(json, inEntityNamed: "User") { id, error in
//...
}
Update
persistentContainer.update("id", with: ["name": "bossy"], inEntityNamed: "User") { id, error in
//...
}
Delete
persistentContainer.delete("id", inEntityNamed: "User") { error in
//...
}