title: SQLAlchemy get list of ids from a query
body: <p>How do I get a list of ids instead of a list of SQLAlchemy objects? 
  Currently I'm doing this:</p>
  
  <pre><code>[x.id for x in random_query.all()]
  </code></pre>
  
  <p>Is there a better way of doing this, preferably by only using SQLAlchemy statements.</p>