Created
June 1, 2019 18:04
-
-
Save jemai/1bb83fcc5804f0b2c3cf0a937a706c54 to your computer and use it in GitHub Desktop.
Persister is a protocol that holds all the queries logic
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
protocol Persister { | |
static func select<T: CodableObject>(type: T.Type, filter: NSPredicate?) -> Results<T> | |
static func insert(object: CodableObject, update: Bool?) | |
static func insert(objects: [CodableObject], update: Bool?) | |
static func delete(object: CodableObject) | |
static func delete<T: CodableObject>(type: T.Type, filter: NSPredicate?) | |
static func deleteAll<T: CodableObject>(type: T.Type) | |
static func resetDB() | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment