mirror of
https://github.com/lacerta-doc/Lacerta.git
synced 2024-11-26 17:53:14 +00:00
source: Dao: WIP, DocumentDao作成(リネーム)
This commit is contained in:
parent
7b8e7a3e48
commit
6cadc2d75b
|
@ -1,4 +0,0 @@
|
|||
package one.nem.lacerta.source.database.dao;
|
||||
|
||||
public interface Document {
|
||||
}
|
|
@ -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<Document> findAll();
|
||||
|
||||
@Query("SELECT * FROM document WHERE id IN (:ids)")
|
||||
|
||||
List<Document> findByIds(List<String> ids);
|
||||
|
||||
// WIP
|
||||
// TODO-rca: Insert, Update, Delete
|
||||
|
||||
}
|
Loading…
Reference in New Issue
Block a user