Open
Description
Repositories should follow a collection-oriented style with a save
function to handle upserting the object as a unit of state.
Example:
trait JobRepository[F[_]: MonadCancelThrow] {
def nextIdentity(): F[JobId]
def save(job: Job): EitherT[F, String, Unit]
def delete(job: Job): EitherT[F, String, Unit]
def get(id: JobId): EitherT[F, String, Job]
def find(
filterOpt: Option[JobFilter],
paginationOpt: Option[Pagination]
): F[List[Job]]
}