Documents Dao作成WIP

This commit is contained in:
r-ca 2023-12-13 18:43:04 +09:00
parent df0386e349
commit 6786fbf569
No known key found for this signature in database
GPG Key ID: 6A72911AC73464A9

View File

@ -0,0 +1,26 @@
package one.nem.lacerta.source.db.dao;
import androidx.room.Dao;
import androidx.room.Query;
import java.util.List;
import one.nem.lacerta.source.db.entity.Documents;
@Dao
public interface DocumentsDao {
@Query("SELECT * FROM documents")
List<Documents> getAll();
@Query("SELECT * FROM documents WHERE id IN (:ids)")
List<Documents> loadAllByIds(int[] ids);
@Query("SELECT * FROM documents WHERE title LIKE :title LIMIT 1")
Documents findByTitle(String title);
@Query("SELECT * FROM documents WHERE id LIKE :id LIMIT 1")
Documents findById(String id);
}