You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It had the same error. Errors: could not find implicit value for parameter DS: fetch.DAtaSource[Int, A].
Fetch is a very nice tool, I really want to learn how to use it, but I am stuck here.
I can not find any similar question from google.
Can you please help?
The text was updated successfully, but these errors were encountered:
Hello,
when I tried to run the code
def getUser(id: UserId): Fetch[User] = Fetch(id) // or, more explicitly: Fetch(id)(UserSource)
It showed error: error: could not find implicit value for parameter DS: fetch.DataSource[UserId, A].
I have tried another example from Fetch github
`implicit object ToStringSource extends DataSource[Int, String]{
override def name = "ToString"
override def fetchOne(id: Int): Query[Option[String]] = {
Query.sync({
println(s"[${Thread.currentThread.getId}] One ToString $id")
Option(id.toString)
})
}
override def fetchMany(ids: NonEmptyList[Int]): Query[Map[Int, String]] = {
Query.sync({
println(s"[${Thread.currentThread.getId}] Many ToString $ids")
ids.toList.map(i => (i, i.toString)).toMap
})
}
}
def fetchString(n: Int): Fetch[String] = Fetch(n) // or, more explicitly: Fetch(n)(ToStringSource)`
It had the same error. Errors: could not find implicit value for parameter DS: fetch.DAtaSource[Int, A].
Fetch is a very nice tool, I really want to learn how to use it, but I am stuck here.
I can not find any similar question from google.
Can you please help?
The text was updated successfully, but these errors were encountered: