mirror of
https://github.com/lacerta-doc/Lacerta.git
synced 2026-11-02 11:37:37 +00:00
source: Dao: WIP, DocumentDao作成(リネーム)
This commit is contained in:
2 files changed
+27
-4
No files matched your search
@@ -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
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user