Releases: 3lvis/Sync
Releases · 3lvis/Sync
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
//...
}
Sync — 2.6.0
- Adds a helper to use Sync as an extension of NSPersistentContainer
persistentContainer.sync(objects, inEntityNamed: "NormalUser") { error in
//....
}
Sync — 2.5.0
Fetch
let fetched = try! Sync.fetch("id", inEntityNamed: "User", using: dataStack.mainContext)
Insert or update
try! Sync.insertOrUpdate(["id": "id", "name": "name"], inEntityNamed: "User", using: context)
Update
try! Sync.update("id", with: ["name": "Elvis"], inEntityNamed: "User", using: context)
Delete
try! Sync.delete("id", inEntityNamed: "User", using: context)
Sync — 2.4.0
- Fixes an issue where ordered relationships wouldn't maintain their order #233
This one couldn't be possible without the help from the fantastic @dersvenhesse! Thanks <3
- Fix issue cleaning to-one relationship using ID #320
- Add
willInsert
delegate. Called before the JSON is used to create a new NSManagedObject. - Add support for NSPersistentContainer
public class func changes(_ changes: [[String : Any]], inEntityNamed entityName: String, predicate: NSPredicate?, persistentContainer: NSPersistentContainer, completion: ((_ error: NSError?) -> Void)?) {
Sync — 2.3.4
- Renamed Sync.Operation to Sync.OperationOptions
- Made Sync.OperationOptions options public
Sync — 2.3.3
Add date format: 2016-10-10 07:00:00
Sync — 2.3.2
- Added Carthage support
- Improved headers, now
DATAFilter.Operation
isSync.Operation
Sync — 2.3.1
- Add support for using
hyper.nonExportable
on attributes to exclude them fromhyp_dictionary
. Foreverland/SYNCPropertyMapper#130
💐 🎉 Thanks @ricardo0100 🎉 💐
Sync — 2.3.0
- Changed NSManagedObject_HYPPropertyMapper with SYNCPropertyMapper.
You might need to replace any:
import NSManagedObject_HYPPropertyMapper
With:
import SYNCPropertyMapper
And:
// Before
hyp_remote
// After
hyp_snakeCase
// Before
hyp_local
// After
hyp_camelCase
Sync — 1.16.1
- Add support for using
hyper.nonExportable
on attributes to exclude them fromhyp_dictionary
. Foreverland/SYNCPropertyMapper#130
💐 🎉 Thanks @ricardo0100 🎉 💐