I need to create a not so simple Sql select query.
Something like this:
@Query("$SELECT_FROM $PRODUCT_TRANSACTION_TABLE WHERE write_status == ($SALE || $AUDIT)")
fun loadProductSaleTransactions(): LiveData<List<TransactionProductTable>>
the field can be Sale
or `Audit
But room return nothing. Can you help me to write correctly ?
I would suggest changing the query to:
@Query("$SELECT_FROM $PRODUCT_TRANSACTION_TABLE WHERE write_status IN ($SALE, $AUDIT)")
fun loadProductSaleTransactions(): LiveData<List<TransactionProductTable>>
Let me know if this fixes the issue. Cheers!