title: How to use StaticQuery in Slick 3.0.0?
body: <p>In Slick 2.1 I had the code below to execute an sql-query from a file:</p>
  
  <pre><code>def fetchResult[T](sql: String)(implicit getResult: GetResult[T]): List[T] = {
      val query = Q.queryNA[T](sql)
      try {
          Database.forDataSource(DB.getDataSource())
              .withSession { implicit session =&gt; query.list }
      }
      catch {
        case e: Throwable =&gt;
          throw new RunSqlException(s"Query $name execution error", e)
      }
  }
  </code></pre>
  
  <p>In Slick 3.0.0 you use dbConfig.db.run method to execute DBIOAction and get a future of the result. But I can't find a way to transform result of Q.queryNA (which is <code>StaticQuery[Unit, R]</code>) into <code>DBIOAction</code>. Does such a way exist?</p>
  
  <p>I ended up with deprecated calls for now. Help me be better!</p>
  
  <pre><code>def fetchResult[T](sql: String)(implicit getResult: GetResult[T]): Future[List[T]] = Future {
      val query = Q.queryNA[T](sql)
      try {
          this.dbConfig.db.withSession { implicit session =&gt; query.list }
      }
      catch {
        case e: Throwable =&gt;
          throw new RunSqlException(s"Query $name execution error", e)
      }
  }
  </code></pre>