mirror of
https://github.com/lacerta-doc/Lacerta.git
synced 2024-11-26 17:53:14 +00:00
Insertを追加
This commit is contained in:
parent
423993b53e
commit
31799218a9
|
@ -1,6 +1,7 @@
|
||||||
package one.nem.lacerta.source.database.dao;
|
package one.nem.lacerta.source.database.dao;
|
||||||
|
|
||||||
import androidx.room.Dao;
|
import androidx.room.Dao;
|
||||||
|
import androidx.room.Insert;
|
||||||
import androidx.room.Query;
|
import androidx.room.Query;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
@ -10,6 +11,7 @@ import one.nem.lacerta.source.database.entity.LibraryEntity;
|
||||||
@Dao
|
@Dao
|
||||||
public interface LibraryDao {
|
public interface LibraryDao {
|
||||||
|
|
||||||
|
// Select
|
||||||
@Query("SELECT * FROM Library WHERE id = :id")
|
@Query("SELECT * FROM Library WHERE id = :id")
|
||||||
LibraryEntity findById(String id);
|
LibraryEntity findById(String id);
|
||||||
|
|
||||||
|
@ -19,6 +21,17 @@ public interface LibraryDao {
|
||||||
@Query("SELECT * FROM Library WHERE id IN (:ids)")
|
@Query("SELECT * FROM Library WHERE id IN (:ids)")
|
||||||
List<LibraryEntity> findByIds(List<String> ids);
|
List<LibraryEntity> findByIds(List<String> ids);
|
||||||
|
|
||||||
// WIP
|
|
||||||
// TODO-rca: Insert, Update, Delete
|
// Insert
|
||||||
|
@Insert
|
||||||
|
void insert(LibraryEntity libraryEntity);
|
||||||
|
|
||||||
|
@Insert
|
||||||
|
void insertAll(LibraryEntity... libraryEntities);
|
||||||
|
|
||||||
|
@Insert
|
||||||
|
void insertAll(List<LibraryEntity> libraryEntities);
|
||||||
|
|
||||||
|
// Update
|
||||||
|
// TODO-rca: 未実装
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user