MedicationScheduleCoreDataStore
public class MedicationScheduleCoreDataStore : CoreDataCrudable, MedicationScheduleStore
-
Initialize an MedicationScheduleCoreDataStore
Declaration
Swift
public init( coreDataControllerFactory: CoreDataControllerFactory, foregroundQueue: AnySchedulerOf<DispatchQueue> = AnyScheduler.main, backgroundQueue: AnySchedulerOf<DispatchQueue> = DispatchQueue(label: "medication-schedule-data-source-queue", qos: .userInitiated).eraseToAnyScheduler() )Parameters
coreDataControllerFactoryFactory that is capable of returning a CoreDataController instance
foregroundQueueread queue, remember never to access the read NSManagedObjects properties/relations on any other queue (Default: DispatchQueue.main)
backgroundQueuewrite queue (Default: DispatchQueue(label: “erx-task-data-source-queue”, qos: .userInitiated))
-
Declaration
Swift
public func fetch(by taskID: ErxTask.ID) throws -> MedicationSchedule? -
Declaration
Swift
public func fetch(byEntryId entryId: UUID, dateProvider: () -> Date) throws -> MedicationScheduleFetchByEntryIdResponse -
Declaration
Swift
public func fetchAll() throws -> [MedicationSchedule] -
Declaration
Swift
public func save(medicationSchedules: [MedicationSchedule]) throws -> [MedicationSchedule] -
Declaration
Swift
public func delete(medicationSchedules: [MedicationSchedule]) throws
View on GitHub
MedicationScheduleCoreDataStore Class Reference