diff --git a/source/src/main/java/one/nem/lacerta/source/database/dao/LibraryDao.java b/source/src/main/java/one/nem/lacerta/source/database/dao/LibraryDao.java index ce86fdcc..87a05162 100644 --- a/source/src/main/java/one/nem/lacerta/source/database/dao/LibraryDao.java +++ b/source/src/main/java/one/nem/lacerta/source/database/dao/LibraryDao.java @@ -1,4 +1,24 @@ package one.nem.lacerta.source.database.dao; +import androidx.room.Dao; +import androidx.room.Query; + +import java.util.List; + +import one.nem.lacerta.source.database.entity.Library; + +@Dao public interface LibraryDao { + + @Query("SELECT * FROM library WHERE id = :id") + Library findById(String id); + + @Query("SELECT * FROM library") + List findAll(); + + @Query("SELECT * FROM library WHERE id IN (:ids)") + List findByIds(List ids); + + // WIP + // TODO-rca: Insert, Update, Delete }