VcsLogDao実装

This commit is contained in:
r-ca 2024-01-14 13:25:29 +09:00
parent 00a141a101
commit a1b6ed81df
No known key found for this signature in database
GPG Key ID: 6A72911AC73464A9

View File

@ -1,7 +1,39 @@
package one.nem.lacerta.source.database.dao; package one.nem.lacerta.source.database.dao;
import androidx.room.Dao; import androidx.room.Dao;
import androidx.room.Insert;
import androidx.room.Query;
import java.util.List;
import one.nem.lacerta.source.database.entity.VcsLogEntity;
@Dao @Dao
public interface VcsLogDao { public interface VcsLogDao {
// Select
@Query("SELECT * FROM vcs_log WHERE id = :id")
VcsLogEntity findById(String id);
@Query("SELECT * FROM vcs_log")
List<VcsLogEntity> findAll();
@Query("SELECT * FROM vcs_log WHERE id IN (:ids)")
List<VcsLogEntity> findByIds(List<String> ids);
@Query("SELECT * FROM vcs_log WHERE document_id = :documentId")
List<VcsLogEntity> findByDocumentId(String documentId);
// Insert
@Insert
void insertAll(VcsLogEntity... vcsLogs);
@Insert
void insertAll(List<VcsLogEntity> vcsLogs);
@Insert
void insert(VcsLogEntity vcsLog);
// TODO-rca: Update, Deleteが必要か検討
} }