To compile a query SQL, you need to compile a function that accepts a arg: typeraised type parameter for each query parameter Rep[type].
I have a class JobRecordand TableQuery jobRecords.
So, to insert an instance of the JobRecord case class, I need to say something like:
val qMapToId = (jobRecords returning jobRecords.map(_.id))
def ucCreate(jobRecord: Rep[JobRecord]) = qMapToId += jobRecord
val cCreate = Compiled(ucCreate _)
But of course, this does not compile, because + = does not accept Rep, and I'm not sure if Rep [JobRecord] is also valid.
I tried many things that are not worth showing, including mixing in the guide to monomorphic case classes . I probably stepped back from the solution several times. A pointer to a working example would be great!