From 678c9730ef65bf07e13bba0b548b162310c2bfd4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=82=8D=E3=82=80=E3=81=AD=E3=81=93?= Date: Wed, 17 Jan 2024 10:39:17 +0900 Subject: [PATCH] =?UTF-8?q?Dao=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../one/nem/lacerta/source/database/dao/VcsLogDao.java | 8 ++++++++ 1 file changed, 8 insertions(+) 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