-
Notifications
You must be signed in to change notification settings - Fork 33
Open
Description
I started using scalasql and wanted to run some integration tests using testcontainers. To populate my test db, I would like to do sth like so:
case class User[T[_]](id: T[String], age: T[Int], ..... /* more fields */ )
object User extends Table[User]
val users: Seq[User] = ...
db.run(
User.insert.batched()(users)
)
This would be more convenient than having to list all attributes in the body of batched (especially if the case class is bigger) and providing tuples for the second parameter list (although I guess the case class objects can be transformed to tuples)
A second question would be how to generate "regular" objects of type User. Since it takes a type parameter this does not seem straightforward.
Metadata
Metadata
Assignees
Labels
No labels