diff --git a/source/src/main/java/one/nem/lacerta/source/database/dao/VcsLogDao.java b/source/src/main/java/one/nem/lacerta/source/database/dao/VcsLogDao.java index cd15c89a..3c1936bf 100644 --- a/source/src/main/java/one/nem/lacerta/source/database/dao/VcsLogDao.java +++ b/source/src/main/java/one/nem/lacerta/source/database/dao/VcsLogDao.java @@ -24,6 +24,14 @@ public interface VcsLogDao { @Query("SELECT * FROM vcs_log WHERE document_id = :documentId") List findByDocumentId(String documentId); + @Query("SELECT * FROM vcs_log WHERE document_id = :documentId AND is_included = :isIncluded ORDER BY created_at") + List findByDocumentIdAndIncluded(String documentId, boolean isIncluded); + + @Query("SELECT * FROM vcs_log WHERE document_id = :documentId AND branch_name = :branchName") + List findByDocumentIdAndBranchName(String documentId, String branchName); + + @Query("SELECT * FROM vcs_log WHERE document_id = :documentId AND branch_name = :branchName AND is_included = :isIncluded ORDER BY created_at") + List findByDocumentIdAndBranchNameAndIncluded(String documentId, String branchName, boolean isIncluded); // Insert @Insert