From 2502cf64ec3429d1fd01c67cbff840d389bcc59c Mon Sep 17 00:00:00 2001 From: r-ca Date: Thu, 14 Dec 2023 02:43:50 +0900 Subject: [PATCH] =?UTF-8?q?source:=20Dao:=20WIP,=20TagDao=E5=AE=9F?= =?UTF-8?q?=E8=A3=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../lacerta/source/database/dao/TagDao.java | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) 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 }