title: Using UNNEST with jOOQ
body: <p>I'm using PostgreSQL 9.4, Spring Boot 1.3.2 and jOOQ 3.7. I'd like to "jOOQify" the following query</p>
  
  <pre><code>SELECT id FROM users WHERE username IN (SELECT * FROM UNNEST(?))
  </code></pre>
  
  <p>so that I can run it with Spring's <code>JdbcTemplate</code> by passing a list or array (in this particular case, an <code>List&lt;String&gt;</code>). I've tried</p>
  
  <pre><code>DSLContext.select(
      USERS.ID
  )
  .from(
      USERS
  )
  .where(
      USERS.USERNAME.in(...)
  )
  </code></pre>
  
  <p>but I can't figure out what to place in <code>...</code>. I tried something like</p>
  
  <pre><code>DSLContext.select(field("*")).from(unnest(myList))
  </code></pre>
  
  <p>but unfortunately the compiler doesn't like that. Is there any simple way I can achieve this?</p>