title: How to use where in @query in room library in Android
body: <p>I am using Room persistence library in my to access DB data.</p>
  
  <p>In my dao class i write queries as </p>
  
  <pre><code>@Query("SELECT id, uniqueId, number, user_id, first_name, last_name,
             image FROM CONTACTS WHERE status != stts")
      abstract fun allContacts(stts: Int): DataSource.Factory&lt;Int, Contact&gt;
  </code></pre>
  
  <p>This is fine . But what if i have to compare status to some constant value ,
  like status != Constant.STATUS_FAILED</p>
  
  <p>Here 
  val STATUS_FAILED = 5 defined in Constant File.</p>
  
  <p>How do i use it in query. I know i can just pass it in the allContacts method as parameter and use like status != :stts . But i do not want that.
  Is there any way to use it directly like status != Constant.STATUS_FAILED.</p>
  
  <p>I do not see any example on <a href="https://developer.android.com/training/data-storage/room/accessing-data" rel="nofollow noreferrer">https://developer.android.com/training/data-storage/room/accessing-data</a></p>