diff options
-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 = ? |