essential-slick icon indicating copy to clipboard operation
essential-slick copied to clipboard

Describe compiled queries

Open d6y opened this issue 10 years ago • 2 comments

d6y avatar Apr 27 '15 11:04 d6y

We need to:

  1. Motivate
  2. Explain the structure and arguments to Compiled
  3. Note that compilation is slow, so do it once.
  4. Give examples.

Example:

  val w = "%door%"
  val q = Compiled ( (p: Rep[String]) => messages.filter(_.content like p) )
  exec( q(w).result )

d6y avatar Nov 30 '15 17:11 d6y

Useful background reading: http://stackoverflow.com/questions/35414292/how-do-compiled-queries-in-slick-actually-work

d6y avatar Apr 11 '16 10:04 d6y