RealmProtocol

Undocumented

  • saveModelToStorage(_:) Extension method

    Save Realm model with update

    Parameter model: model

    Declaration

    Swift

    public static func saveModelToStorage<M: ModelProtocol>(_ model: M) where M:Object
  • saveModelArrayToStorage(_:) Extension method

     Save 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 method

     Update Realm Array model with update

    Declaration

    Swift

    public static func updateObject<M: ModelProtocol>(_ model: M) where M: Object

    Parameters

    model

    model

  • removeFrom(_:) Extension method

    Remove data from table

    Declaration

    Swift

    public static func removeFrom<R: Object>(_ type: R.Type)

    Parameters

    type

    Object.Type

  • Fetch 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

  • Fetch 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