你能用泛型类型在 doobie 中进行批量更新吗?
这段代码:
def insertMany[T](ps: List[T]): Task[List[T]] = {
val sql = "insert into person (name, age) values (?, ?)"
Update[T](sql).updateMany(ps)
}
给我:could not find implicit value for parameter W: doobie.util.Write[T]