aboutsummaryrefslogtreecommitdiff
path: root/libbrep/common.hxx
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2017-05-16 23:27:53 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2017-05-19 11:44:48 +0300
commit4718a059f842a791c89a1922996bb8f1dbea8f65 (patch)
treea6dcc621f8287d444a699355f89b4a383eafd283 /libbrep/common.hxx
parente2264d6c34de011753913dd9b447b3d38649619c (diff)
Add filter form to builds page
Diffstat (limited to 'libbrep/common.hxx')
-rw-r--r--libbrep/common.hxx8
1 files changed, 5 insertions, 3 deletions
diff --git a/libbrep/common.hxx b/libbrep/common.hxx
index 942790c..6bc5aca 100644
--- a/libbrep/common.hxx
+++ b/libbrep/common.hxx
@@ -318,10 +318,12 @@ namespace brep
template <typename T>
inline auto
- order_by_version_desc (const T& x) -> //decltype ("ORDER BY" + x.epoch)
- decltype (x.epoch == 0)
+ order_by_version_desc (
+ const T& x,
+ bool first = true) -> //decltype ("ORDER BY" + x.epoch)
+ decltype (x.epoch == 0)
{
- return "ORDER BY"
+ return (first ? "ORDER BY" : ", ")
+ x.epoch + "DESC,"
+ x.canonical_upstream + "DESC,"
+ x.canonical_release + "DESC,"