mirror of
https://github.com/lacerta-doc/Lacerta.git
synced 2025-01-18 18:33:16 +00:00
source: Dao: WIP, TagDao実装
This commit is contained in:
parent
2ccc576c69
commit
2502cf64ec
|
@ -1,4 +1,24 @@
|
|||
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.Tag;
|
||||
|
||||
@Dao
|
||||
public interface TagDao {
|
||||
|
||||
@Query("SELECT * FROM tag WHERE id = :id")
|
||||
Tag findById(String id);
|
||||
|
||||
@Query("SELECT * FROM tag")
|
||||
List<Tag> findAll();
|
||||
|
||||
@Query("SELECT * FROM tag WHERE id IN (:ids)")
|
||||
List<Tag> findByIds(List<String> ids);
|
||||
|
||||
// WIP
|
||||
// TODO-rca: Insert, Update, Delete
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user