mirror of
https://github.com/Aviortheking/Neo-Store.git
synced 2025-06-21 06:39:19 +00:00
Add: Repository sheet
This commit is contained in:
@ -51,6 +51,9 @@ interface RepositoryDao : BaseDao<Repository> {
|
||||
@Query("SELECT * FROM repository WHERE _id = :id and deleted == 0")
|
||||
fun get(id: Long): Repository?
|
||||
|
||||
@Query("SELECT * FROM repository WHERE _id = :id and deleted == 0")
|
||||
fun getLive(id: Long): LiveData<Repository?>
|
||||
|
||||
@get:Query("SELECT * FROM repository WHERE deleted == 0 ORDER BY _id ASC")
|
||||
val allCursor: Cursor
|
||||
|
||||
@ -81,6 +84,9 @@ interface ProductDao : BaseDao<Product> {
|
||||
@Query("SELECT COUNT(*) FROM product WHERE repository_id = :id")
|
||||
fun countForRepository(id: Long): Long
|
||||
|
||||
@Query("SELECT COUNT(*) FROM product WHERE repository_id = :id")
|
||||
fun countForRepositoryLive(id: Long): LiveData<Long>
|
||||
|
||||
@Query("SELECT * FROM product WHERE package_name = :packageName")
|
||||
fun get(packageName: String): List<Product?>
|
||||
|
||||
|
Reference in New Issue
Block a user