summaryrefslogtreecommitdiff
path: root/gentoobrowse-api/service
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2016-05-31 20:57:26 +0100
committerDan Goodliffe <dan@randomdan.homeip.net>2016-05-31 20:57:26 +0100
commit96383c37d0652cad9b87421a43cb28dcd2974bf0 (patch)
tree18cfc7d0cee22831986c8abe1913073526a729c1 /gentoobrowse-api/service
parentRemove debug and bind correct fields of bug data (diff)
downloadgentoobrowse-api-96383c37d0652cad9b87421a43cb28dcd2974bf0.tar.bz2
gentoobrowse-api-96383c37d0652cad9b87421a43cb28dcd2974bf0.tar.xz
gentoobrowse-api-96383c37d0652cad9b87421a43cb28dcd2974bf0.zip
Don't require processOrder on file types
Diffstat (limited to 'gentoobrowse-api/service')
-rw-r--r--gentoobrowse-api/service/maintenancePackageTree.cpp6
-rw-r--r--gentoobrowse-api/service/sql/maintenance/fileListCreate.sql1
2 files changed, 5 insertions, 2 deletions
diff --git a/gentoobrowse-api/service/maintenancePackageTree.cpp b/gentoobrowse-api/service/maintenancePackageTree.cpp
index 5e3d4f4..f5a06de 100644
--- a/gentoobrowse-api/service/maintenancePackageTree.cpp
+++ b/gentoobrowse-api/service/maintenancePackageTree.cpp
@@ -175,7 +175,11 @@ namespace Gentoo {
tp.beforeDelete = boost::bind(&Maintenance::fileDeleted, this, dbc, &fps, tmp, _1);
tp.beforeUpdate = boost::bind(&Maintenance::fileChanged, this, dbc, &fps, tmp, _1);
tp.beforeInsert = boost::bind(&Maintenance::fileCreated, this, dbc, &fps, tmp, _1);
- DB::StaticSqlWriter obpo("processOrder NULLS LAST");
+ DB::StaticSqlWriter obpo("CASE \
+ WHEN b.fileTypeId = 1 THEN 1 \
+ WHEN b.fileTypeId = 10 THEN 2 \
+ WHEN b.fileTypeId = 4 THEN 3 \
+ END NULLS LAST");
tp.order = &obpo;
dbc->patchTable(&tp);
for (const auto & fp : fps) {
diff --git a/gentoobrowse-api/service/sql/maintenance/fileListCreate.sql b/gentoobrowse-api/service/sql/maintenance/fileListCreate.sql
index d8d627c..76d5536 100644
--- a/gentoobrowse-api/service/sql/maintenance/fileListCreate.sql
+++ b/gentoobrowse-api/service/sql/maintenance/fileListCreate.sql
@@ -3,7 +3,6 @@ SELECT
r.repoid,
fl.filename,
ft.filetypeid,
- ft.processOrder,
(STRING_TO_ARRAY(fl.filename, '/'))[2:100] pathparts,
fl.filesize,
fl.filemtime moddate