diff options
author | Dan Goodliffe <dan@randomdan.homeip.net> | 2016-04-25 01:38:43 +0100 |
---|---|---|
committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2016-04-25 21:38:52 +0100 |
commit | bb579c4ebe04bc2e60a309453372649ba10a12df (patch) | |
tree | 589a20809be102cd8e61e761b924dc1fcae6f3bc | |
parent | Adds count assertions (diff) | |
download | gentoobrowse-api-bb579c4ebe04bc2e60a309453372649ba10a12df.tar.bz2 gentoobrowse-api-bb579c4ebe04bc2e60a309453372649ba10a12df.tar.xz gentoobrowse-api-bb579c4ebe04bc2e60a309453372649ba10a12df.zip |
Update package description with new versions
-rw-r--r-- | gentoobrowse-api/service/maintenance/ebuildMetaProcessor.cpp | 6 | ||||
-rw-r--r-- | gentoobrowse-api/service/sql/maintenance/packageDescUpdate.sql | 3 |
2 files changed, 9 insertions, 0 deletions
diff --git a/gentoobrowse-api/service/maintenance/ebuildMetaProcessor.cpp b/gentoobrowse-api/service/maintenance/ebuildMetaProcessor.cpp index b63bb55..1bd8c6c 100644 --- a/gentoobrowse-api/service/maintenance/ebuildMetaProcessor.cpp +++ b/gentoobrowse-api/service/maintenance/ebuildMetaProcessor.cpp @@ -11,6 +11,7 @@ #include "dbUtils.h" #include <sql/maintenance/categoryInsert.sql.h> #include <sql/maintenance/packageInsert.sql.h> +#include <sql/maintenance/packageDescUpdate.sql.h> #include <sql/maintenance/packagePrune.sql.h> #include <sql/maintenance/categoryPrune.sql.h> #include <sql/maintenance/ebuildInsert.sql.h> @@ -202,6 +203,11 @@ namespace Gentoo { t.cols = { "packageId", "url" }; t.where = &pwf; dbc->patchTable(&t); + // Description + auto u = dbc->modify(sql::maintenance::packageDescUpdate::sql); + Utils::Database::bindOptionalsS(u.get(), 0, { ecp.get("DESCRIPTION") }); + u->bindParamI(1, packageId); + u->execute(); } } diff --git a/gentoobrowse-api/service/sql/maintenance/packageDescUpdate.sql b/gentoobrowse-api/service/sql/maintenance/packageDescUpdate.sql new file mode 100644 index 0000000..d3fed1c --- /dev/null +++ b/gentoobrowse-api/service/sql/maintenance/packageDescUpdate.sql @@ -0,0 +1,3 @@ +UPDATE gentoobrowse.packages p SET + description = ? +WHERE p.packageid = ? |