Here are some questions that have a potential to become frequently asked.

  1. I have plenty of time, I don't want to use any timeout for any of my queries. What can I do?

    Declare implicit Timeout instance of infinite duration — io.rdbc.sapi.Timeout.Inf.

  2. How do I build SQL dynamically using sql interpolator?

    Use special #$ prefix for the dynamic parts. See this paragraph for details.

  3. How to pass Timeout explicitly to ExecutableStatement's executeForKey method? I keep getting compilation errors.

    executeForKey method's declaration is

    def executeForKey[K: ClassTag]()(implicit timeout: Timeout): Future[K]

    Under the hood, this declaration really means this:

    def executeForKey[K]()(implicit classTag: ClassTag[K], timeout: Timeout): Future[K]

    So you can't really execute this method like this:


    Instead, you have to do this:

    executeForKey()(timeout, classOf[Int])

  4. I'm executing insert statement and trying to get auto-generated key from the DB but nothing is returned. What am I doing wrong?

    You probably forgot to set a generatedKeyCols statement option accordingly. See this paragraph for details.