source: Dao: WIP, DocumentDao作成(リネーム)

This commit is contained in:
r-ca 2023-12-14 02:40:30 +09:00
parent 7b8e7a3e48
commit 6cadc2d75b
No known key found for this signature in database
GPG Key ID: 6A72911AC73464A9
2 changed files with 27 additions and 4 deletions

View File

@ -1,4 +0,0 @@
package one.nem.lacerta.source.database.dao;
public interface Document {
}

View File

@ -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
}