Slide 9
Slide 9 text
Copyright © nextbeat All Rights Reserved
Copyright © nextbeat All Rights Reserved 9
class TaskRepositoryImpl(using xa:
Transactor[IO])
extends TaskRepository[IO],
DoobieRepository[IO], CustomMapping:
def findAll():
IO[List[Task.EmbeddedId]] = ???
共通ライブラリの開発
F[_] の選定はプロダクト側で行う
//- Repository for task
trait TaskRepository[F[_]]:
/** Get list of all entities
*
* @return list of all entity
*/
def findAll(): F[Seq[Task.EmbeddedId]]
class TaskRepositoryImpl(using
QuillDatabase)
extends TaskRepository[Id],
QuillRepository, db.CustomEncoding:
def findAll(): Seq[Task.EmbeddedId] =
???
ドメイン層 実装 (doobie) 実装 (quill)