mirror of
https://github.com/lacerta-doc/Lacerta.git
synced 2024-11-26 09:43:15 +00:00
Dao実装
This commit is contained in:
parent
396c5e914f
commit
05915a2f4e
|
@ -10,4 +10,28 @@ import one.nem.lacerta.source.database.entity.ToxiDocumentTagEntity;
|
|||
|
||||
@Dao
|
||||
public interface ToxiDocumentTagDao {
|
||||
|
||||
@Query("SELECT * FROM toxi_document_tag WHERE document_id = :documentId")
|
||||
List<ToxiDocumentTagEntity> findByDocumentId(String documentId);
|
||||
|
||||
@Query("SELECT * FROM toxi_document_tag WHERE tag_id = :tagId")
|
||||
List<ToxiDocumentTagEntity> findByTagId(String tagId);
|
||||
|
||||
@Insert
|
||||
void insert(ToxiDocumentTagEntity toxiDocumentTag);
|
||||
|
||||
@Insert
|
||||
void insertAll(ToxiDocumentTagEntity... toxiDocumentTags);
|
||||
|
||||
@Insert
|
||||
void insertAll(List<ToxiDocumentTagEntity> toxiDocumentTags);
|
||||
|
||||
@Query("DELETE FROM toxi_document_tag WHERE document_id = :documentId")
|
||||
void deleteByDocumentId(String documentId);
|
||||
|
||||
@Query("DELETE FROM toxi_document_tag WHERE tag_id = :tagId")
|
||||
void deleteByTagId(String tagId);
|
||||
|
||||
@Query("DELETE FROM toxi_document_tag WHERE document_id = :documentId AND tag_id = :tagId")
|
||||
void deleteByDocumentIdAndTagId(String documentId, String tagId);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user