(store: Store, prioritizedIds: bigint[], update: Partial<DbPrioritized>)
| 38 | } |
| 39 | |
| 40 | export function updatePrioritized(store: Store, prioritizedIds: bigint[], update: Partial<DbPrioritized>) { |
| 41 | return db.transaction(() => { |
| 42 | const updatedPrioritized = prioritizedIds.map(id => store.updatePrioritized({ id, ...update })); |
| 43 | const updatedQueueIds = uniq(updatedPrioritized.map(prioritized => prioritized.queueId)); |
| 44 | |
| 45 | reEvaluatePrioritized(store, updatedQueueIds); |
| 46 | |
| 47 | return { updatedPrioritized, updatedQueueIds }; |
| 48 | }); |
| 49 | } |
| 50 | |
| 51 | export function deletePrioritized(store: Store, prioritizedIds: bigint[]) { |
| 52 | return db.transaction(() => { |
nothing calls this directly
no test coverage detected