Skip to content

Instantly share code, notes, and snippets.

@hieuwu
Last active Mar 21, 2022
Embed
What would you like to do?
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