diff --git a/source/src/main/java/one/nem/lacerta/source/database/dao/Document.java b/source/src/main/java/one/nem/lacerta/source/database/dao/Document.java deleted file mode 100644 index f0c7f646..00000000 --- a/source/src/main/java/one/nem/lacerta/source/database/dao/Document.java +++ /dev/null @@ -1,4 +0,0 @@ -package one.nem.lacerta.source.database.dao; - -public interface Document { -} diff --git a/source/src/main/java/one/nem/lacerta/source/database/dao/DocumentDao.java b/source/src/main/java/one/nem/lacerta/source/database/dao/DocumentDao.java new file mode 100644 index 00000000..ab875d3a --- /dev/null +++ b/source/src/main/java/one/nem/lacerta/source/database/dao/DocumentDao.java @@ -0,0 +1,27 @@ +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.Document; + + +@Dao +public interface DocumentDao { + + @Query("SELECT * FROM document WHERE id = :id") + Document findById(String id); + + @Query("SELECT * FROM document") + List findAll(); + + @Query("SELECT * FROM document WHERE id IN (:ids)") + + List findByIds(List ids); + + // WIP + // TODO-rca: Insert, Update, Delete + +}