diff --git a/source/src/main/java/one/nem/lacerta/source/database/dao/TagDao.java b/source/src/main/java/one/nem/lacerta/source/database/dao/TagDao.java index a3598472..a7655dab 100644 --- a/source/src/main/java/one/nem/lacerta/source/database/dao/TagDao.java +++ b/source/src/main/java/one/nem/lacerta/source/database/dao/TagDao.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.Tag; + +@Dao public interface TagDao { + + @Query("SELECT * FROM tag WHERE id = :id") + Tag findById(String id); + + @Query("SELECT * FROM tag") + List findAll(); + + @Query("SELECT * FROM tag WHERE id IN (:ids)") + List findByIds(List ids); + + // WIP + // TODO-rca: Insert, Update, Delete }