mirror of
https://github.com/lacerta-doc/Lacerta.git
synced 2024-11-23 00:13:16 +00:00
Documents Dao作成WIP
This commit is contained in:
parent
df0386e349
commit
6786fbf569
|
@ -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);
|
||||
|
||||
}
|
Loading…
Reference in New Issue
Block a user