Last active
March 21, 2022 15:01
-
-
Save hieuwu/8225f52e45e0016d2868bce876b3488d to your computer and use it in GitHub Desktop.
Line Item dao
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@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