RealmProtocol
Undocumented
-
saveModelToStorage(_:)
Extension methodSave Realm model with update
Parameter model: model
Declaration
Swift
public static func saveModelToStorage<M: ModelProtocol>(_ model: M) where M:Object
-
saveModelArrayToStorage(_:)
Extension methodSave Realm Array model with update
Declaration
Swift
public static func saveModelArrayToStorage<M: ModelProtocol>(_ array: Array<M>) where M: Object
Parameters
model
Array of model
-
updateObject(_:)
Extension methodUpdate Realm Array model with update
Declaration
Swift
public static func updateObject<M: ModelProtocol>(_ model: M) where M: Object
Parameters
model
model
-
removeFrom(_:)
Extension methodRemove data from table
Declaration
Swift
public static func removeFrom<R: Object>(_ type: R.Type)
Parameters
type
Object.Type
-
fetchItems(_:predicate:success:)
Extension methodFetch all items that conform NSPredicate
Declaration
Swift
public static func fetchItems<M: ModelProtocol>(_ type: M.Type, predicate: NSPredicate, success: (Array<M>)->Void) where M: Object
Parameters
type
Realm Object type
predicate
NSPredicate
success
array of model
-
fetchAllItems(_:success:failure:)
Extension methodFetch all items
Declaration
Swift
public static func fetchAllItems<M: ModelProtocol>( _ type: M.Type, success: (Array<M>)->Void, failure: @escaping ResponseHandler ) where M: Object
Parameters
type
Realm Object type
success
array of model