mirror of
https://github.com/lacerta-doc/Lacerta.git
synced 2024-11-23 00:13:16 +00:00
source: Dao: WIP, LibraryDao実装
This commit is contained in:
parent
b4ee93cd5c
commit
2ccc576c69
|
@ -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.Library;
|
||||
|
||||
@Dao
|
||||
public interface LibraryDao {
|
||||
|
||||
@Query("SELECT * FROM library WHERE id = :id")
|
||||
Library findById(String id);
|
||||
|
||||
@Query("SELECT * FROM library")
|
||||
List<Library> findAll();
|
||||
|
||||
@Query("SELECT * FROM library WHERE id IN (:ids)")
|
||||
List<Library> findByIds(List<String> ids);
|
||||
|
||||
// WIP
|
||||
// TODO-rca: Insert, Update, Delete
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user