diff options
Diffstat (limited to 'src/main/java/io/trygvis/esper/testing/core/db/BuildDao.java')
-rw-r--r-- | src/main/java/io/trygvis/esper/testing/core/db/BuildDao.java | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/main/java/io/trygvis/esper/testing/core/db/BuildDao.java b/src/main/java/io/trygvis/esper/testing/core/db/BuildDao.java index e498017..416faf6 100644 --- a/src/main/java/io/trygvis/esper/testing/core/db/BuildDao.java +++ b/src/main/java/io/trygvis/esper/testing/core/db/BuildDao.java @@ -57,7 +57,7 @@ public class BuildDao { } } - public List<UUID> selectPersonsFromBuildParticipant(UUID build) throws SQLException { + public List<UUID> selectBuildParticipantByBuild(UUID build) throws SQLException { try (PreparedStatement s = c.prepareStatement("SELECT person FROM build_participant WHERE build=?")) { int i = 1; s.setString(i, build.toString()); @@ -65,6 +65,14 @@ public class BuildDao { } } + public List<PersonDto> selectPersonsFromBuildParticipant(UUID build) throws SQLException { + try (PreparedStatement s = c.prepareStatement("SELECT " + PersonDao.PERSON + " FROM person p, build_participant bp WHERE bp.person = p.uuid AND build=?")) { + int i = 1; + s.setString(i, build.toString()); + return toList(s, PersonDao.person); + } + } + public SqlOption<BuildDto> selectBuild(UUID uuid) throws SQLException { try (PreparedStatement s = c.prepareStatement("SELECT " + BUILD + " FROM build WHERE uuid=?")) { int i = 1; |