essential-slick
essential-slick copied to clipboard
Describe compiled queries
We need to:
- Motivate
- Explain the structure and arguments to
Compiled - Note that compilation is slow, so do it once.
- Give examples.
Example:
val w = "%door%"
val q = Compiled ( (p: Rep[String]) => messages.filter(_.content like p) )
exec( q(w).result )
Useful background reading: http://stackoverflow.com/questions/35414292/how-do-compiled-queries-in-slick-actually-work