PharmacyCoreDataStore
public class PharmacyCoreDataStore : PharmacyLocalDataStore, CoreDataCrudable
Store for fetching, creating, updating or deleting PharmacyLocations on the provided CoreDataController
[REQ:BSI-eRp-ePA:O.Source_2#2] CoreDataStore adapter for PharmacyLocations
-
Initialize a Pharmacy Core Data Store
Declaration
Swift
public init( coreDataControllerFactory: CoreDataControllerFactory, foregroundQueue: AnySchedulerOf<DispatchQueue> = AnyScheduler.main, backgroundQueue: AnySchedulerOf<DispatchQueue> = DispatchQueue(label: "pharmacy-queue", qos: .userInitiated) .eraseToAnyScheduler() )Parameters
coreDataControllerFactoryFactory that is capable of providing a CoreDataController
foregroundQueueread queue, remember never to access the read NSManagedObjects properties/relations on any other queue (Default: DispatchQueue.main)
backgroundQueuewrite queue (Default: DispatchQueue(label: “pharmacy-queue”, qos: .userInitiated))
-
Declaration
Swift
public func fetchPharmacy(by telematikId: String) -> AnyPublisher<PharmacyLocation?, LocalStoreError> -
Declaration
Swift
public func listPharmacies(count: Int? = nil) -> AnyPublisher<[PharmacyLocation], LocalStoreError> -
Declaration
Swift
public func save(pharmacies: [PharmacyLocation]) -> AnyPublisher<Bool, LocalStoreError> -
Declaration
Swift
public func update(telematikId: String, mutating: @escaping (inout PharmacyLocation) -> Void) -> AnyPublisher<PharmacyLocation, LocalStoreError> -
Declaration
Swift
public func delete(pharmacies: [PharmacyLocation]) -> AnyPublisher<Bool, LocalStoreError> -
Declaration
Swift
public enum Error : Swift.Error
View on GitHub
PharmacyCoreDataStore Class Reference