LocalDataProvider
public class LocalDataProvider<Record> : IndexableDataProvider where Record : IndexableRecord, Record : SearchResult, Record : Decodable, Record : Encodable
Search records data provider with local storage
-
Undocumented
Declaration
Swift
public static var updateNotificationName: Notification.Name { get }
-
Declaration
Swift
public static var providerIdentifier: String { get }
-
Dictionary with all records
Declaration
Swift
public var recordsMap: [String : Record]
-
Records storage
Declaration
Swift
public let persistentService: CodablePersistentService<[Record]>?
-
Undocumented
Declaration
Swift
public init()
-
Declaration
Swift
public func registerProviderInteractor(interactor providerInteractor: RecordsProviderInteractor)
-
Declaration
Swift
public func resolve(suggestion: SearchResultSuggestion, completion: (SearchResult?) -> Void)
-
Adds record to providers storage
Declaration
Swift
public func add(record: Record)
Parameters
record
entity to add
-
Add or override existoing record to provireds storage
Declaration
Swift
public func update(record: Record)
Parameters
record
entirny to update
-
Deletes record by id
Declaration
Swift
public func delete(recordId: String)
Parameters
recordId
record id to delete
-
Deletes all records
Declaration
Swift
public func deleteAll()