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 8948b9dd..96cb18a9 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,6 +1,7 @@ package one.nem.lacerta.source.database.dao; import androidx.room.Dao; +import androidx.room.Insert; import androidx.room.Query; import java.util.List; @@ -10,6 +11,7 @@ import one.nem.lacerta.source.database.entity.LibraryEntity; @Dao public interface LibraryDao { + // Select @Query("SELECT * FROM Library WHERE id = :id") LibraryEntity findById(String id); @@ -19,6 +21,17 @@ public interface LibraryDao { @Query("SELECT * FROM Library WHERE id IN (:ids)") List findByIds(List ids); - // WIP - // TODO-rca: Insert, Update, Delete + + // Insert + @Insert + void insert(LibraryEntity libraryEntity); + + @Insert + void insertAll(LibraryEntity... libraryEntities); + + @Insert + void insertAll(List libraryEntities); + + // Update + // TODO-rca: 未実装 }