title: Room DAO Order By ASC or DESC variable
body: <p>I'm trying to make a <code>@Query</code> function in my <code>@Dao</code> interface which has a boolean parameter, <code>isAsc</code> to determine the order:</p>
  
  <pre><code>@Query("SELECT * FROM Persons ORDER BY first_name (:isAsc ? ASC : DESC)")
  List&lt;Person&gt; getPersonsAlphabetically(boolean isAsc);
  </code></pre>
  
  <p>Apparently this isn't allowed. Is there a work around here?</p>
  
  <p><strong>EDIT:</strong></p>
  
  <p>It seemed odd to use two queries (below) since the only difference is <code>ASC</code> and <code>DESC</code>:</p>
  
  <pre><code>@Query("SELECT * FROM Persons ORDER BY last_name ASC")
  List&lt;Person&gt; getPersonsSortByAscLastName();
  
  @Query("SELECT * FROM Persons ORDER BY last_name DESC")
  List&lt;Person&gt; getPersonsSortByDescLastName();
  </code></pre>