我使用了一个由光滑的代码生成器生成的代码.
我的表有超过22列,因此它使用 HList
它生成1种类型和1种功能:
type AccountRow
def AccountRow(uuid: java.util.UUID, providerid: String, email: Option[String], ...):AccountRow
Run Code Online (Sandbox Code Playgroud)
如何从生成的代码中编写编译的插入代码?
我试过这个:
val insertAccountQueryCompiled = {
def q(uuid:Rep[UUID], providerId:Rep[String], email:Rep[Option[String]], ...) = Account += AccountRow(uuid, providerId, email, ...)
Compiled(q _)
}
Run Code Online (Sandbox Code Playgroud)
我需要转换Rep[T]
到T
为AccountRow功能工作.我怎么做?
谢谢