From 972b694a6dd3c62dcc2fb3d293413ed98f5149c4 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Wed, 27 Apr 2016 21:19:54 +0100 Subject: Rename badly named SQL expression --- gentoobrowse-api/service/maintenance/useLocalProcessor.cpp | 6 +++--- gentoobrowse-api/service/sql/maintenance/rawUseLocalDesc.sql | 7 ------- gentoobrowse-api/service/sql/maintenance/useLocalMap.sql | 7 +++++++ 3 files changed, 10 insertions(+), 10 deletions(-) delete mode 100644 gentoobrowse-api/service/sql/maintenance/rawUseLocalDesc.sql create mode 100644 gentoobrowse-api/service/sql/maintenance/useLocalMap.sql diff --git a/gentoobrowse-api/service/maintenance/useLocalProcessor.cpp b/gentoobrowse-api/service/maintenance/useLocalProcessor.cpp index 4ce5d55..065022e 100644 --- a/gentoobrowse-api/service/maintenance/useLocalProcessor.cpp +++ b/gentoobrowse-api/service/maintenance/useLocalProcessor.cpp @@ -5,7 +5,7 @@ #include "utils/fileUtils.h" #include "utils/dbUtils.h" #include -#include "sql/maintenance/rawUseLocalDesc.sql.h" +#include "sql/maintenance/useLocalMap.sql.h" using namespace Gentoo::Utils::File; @@ -25,14 +25,14 @@ namespace Gentoo { UseLocalProcessor::modified(DB::Connection * dbc, const boost::filesystem::path &, const boost::filesystem::path & path) const { DB::TablePatch p; - auto tempTable = Utils::Database::namedTemp(dbc, "rawuselocaldesc", { + auto tempTable = Utils::Database::namedTemp(dbc, "tmp_uselocalraw", { { "category", "text" }, { "package", "text" }, { "use", "text" }, { "description", "text" } }); p.dest = "gentoobrowse.use_local"; - DB::StaticSqlWriter srcExpr(sql::maintenance::rawUseLocalDesc::sql); + DB::StaticSqlWriter srcExpr(sql::maintenance::useLocalMap::sql); p.srcExpr = &srcExpr; p.pk = { "packageId", "use" }; p.cols = { "packageId", "use", "description" }; diff --git a/gentoobrowse-api/service/sql/maintenance/rawUseLocalDesc.sql b/gentoobrowse-api/service/sql/maintenance/rawUseLocalDesc.sql deleted file mode 100644 index dedfbc8..0000000 --- a/gentoobrowse-api/service/sql/maintenance/rawUseLocalDesc.sql +++ /dev/null @@ -1,7 +0,0 @@ -( - SELECT p.packageId, d.use, d.description - FROM gentoobrowse.categories c, gentoobrowse.packages p, rawuselocaldesc d - WHERE c.categoryId = p.categoryId - AND c.name = d.category - AND p.name = d.package -) diff --git a/gentoobrowse-api/service/sql/maintenance/useLocalMap.sql b/gentoobrowse-api/service/sql/maintenance/useLocalMap.sql new file mode 100644 index 0000000..2d12184 --- /dev/null +++ b/gentoobrowse-api/service/sql/maintenance/useLocalMap.sql @@ -0,0 +1,7 @@ +( + SELECT p.packageId, d.use, d.description + FROM gentoobrowse.categories c, gentoobrowse.packages p, tmp_uselocalraw d + WHERE c.categoryId = p.categoryId + AND c.name = d.category + AND p.name = d.package +) -- cgit v1.2.3