Skip to content

Instantly share code, notes, and snippets.

@hieuwu
Last active March 21, 2022 15:01
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save hieuwu/8225f52e45e0016d2868bce876b3488d to your computer and use it in GitHub Desktop.
Line Item dao
@Dao
interface LineItemDao {
//Get all line item in along with its product
@Transaction
@Query("SELECT * FROM line_items ")
fun getAll(): Flow<List<LineItemAndProduct>>
//Get line item in an order by orderId
@Transaction
@Query("SELECT * FROM line_items WHERE orderId = :orderId")
fun getLineItemInOrder(orderId: String): Flow<List<LineItemAndProduct>>
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment