mirror of
https://github.com/imcarlost/Friendlists.git
synced 2026-04-10 02:46:54 -04:00
implement the album feature
This commit is contained in:
@@ -1,5 +0,0 @@
|
||||
package com.hako.base.domain
|
||||
|
||||
interface UseCase <T> {
|
||||
fun execute(onSuccess: (List<T>) -> Unit, onError: (Throwable) -> Unit, onLoading: () -> Unit)
|
||||
}
|
||||
@@ -18,6 +18,9 @@ interface AlbumDao {
|
||||
@get:Query("SELECT * FROM ${AlbumEntity.TABLE_NAME}")
|
||||
val all: List<AlbumEntity>
|
||||
|
||||
@Query("SELECT * FROM ${AlbumEntity.TABLE_NAME} WHERE userId = :userId ORDER BY id ASC")
|
||||
fun getAlbums(userId: Int): List<AlbumEntity>
|
||||
|
||||
@Query("SELECT COUNT(*) FROM ${AlbumEntity.TABLE_NAME}")
|
||||
fun count(): Int
|
||||
|
||||
|
||||
Reference in New Issue
Block a user