diff options
author | Trygve Laugstøl <trygvis@inamo.no> | 2013-01-19 10:20:43 +0100 |
---|---|---|
committer | Trygve Laugstøl <trygvis@inamo.no> | 2013-01-19 10:20:43 +0100 |
commit | fd953370ba0daea03c5de58aac30e097f86826c6 (patch) | |
tree | b41143ecd8e65bfeb1ceceb2500c23146ca7780e /src/main/java/io/trygvis/esper/testing/core/db/BuildDao.java | |
parent | eb6cbd28992cec9025a8e95f8f03ae3839699e0b (diff) | |
download | esper-testing-fd953370ba0daea03c5de58aac30e097f86826c6.tar.gz esper-testing-fd953370ba0daea03c5de58aac30e097f86826c6.tar.bz2 esper-testing-fd953370ba0daea03c5de58aac30e097f86826c6.tar.xz esper-testing-fd953370ba0daea03c5de58aac30e097f86826c6.zip |
o Making sure every resource that supports paging has a default ordering.
o Fixing mis-mapped JenkinsJob.
o Better navigation in the Jenkins app, <a> links are now proper links.
Diffstat (limited to 'src/main/java/io/trygvis/esper/testing/core/db/BuildDao.java')
-rwxr-xr-x | src/main/java/io/trygvis/esper/testing/core/db/BuildDao.java | 4 |
1 files changed, 2 insertions, 2 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 c6a46c6..7c9ccb7 100755 --- a/src/main/java/io/trygvis/esper/testing/core/db/BuildDao.java +++ b/src/main/java/io/trygvis/esper/testing/core/db/BuildDao.java @@ -92,7 +92,7 @@ public class BuildDao { public List<BuildDto> selectBuildsByPerson(Uuid person, PageRequest page) throws SQLException { String sql = "SELECT " + BUILD + " FROM build b, build_participant bp WHERE bp.person=? AND b.uuid = bp.build"; - sql += orderBy(page.orderBy, "created_date", "timestamp"); + sql += orderBy(ifEmpty(page.orderBy, "created_date-"), "created_date", "timestamp"); sql += " LIMIT ? OFFSET ?"; try (PreparedStatement s = c.prepareStatement(sql)) { @@ -106,7 +106,7 @@ public class BuildDao { public List<BuildDto> selectBuilds(PageRequest page) throws SQLException { String sql = "SELECT " + BUILD + " FROM build"; - sql += orderBy(page.orderBy, "created_date", "timestamp"); + sql += orderBy(ifEmpty(page.orderBy, "created_date-"), "created_date", "timestamp"); sql += " LIMIT ? OFFSET ?"; try (PreparedStatement s = c.prepareStatement(sql)) { |