title: Any better, more idiomatic way to convert SQL ResultSet to a Scala List or other collection type?
body: <p>I'm using the following naive code to convert a <code>ResultSet</code> to a Scala <code>List</code>:</p>
  
  <pre><code>val rs = pstmt.executeQuery()
  var nids = List[String]()
  while (rs.next()) {
    nids = nids :+ rs.getString(1)
  }
  rs.close()
  </code></pre>
  
  <p>Is there a better approach, something more idiomatic to Scala, that doesn't require using a mutable object?</p>