summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2016-04-26 23:43:19 +0100
committerDan Goodliffe <dan@randomdan.homeip.net>2016-04-26 23:43:19 +0100
commit0324c90dc754fe05f853c65d90ad769fa830b4f0 (patch)
treefff4d6c461c9ca67ce318cb7422eb979dc9fc0f4
parentProcess local use flags (diff)
downloadgentoobrowse-api-0324c90dc754fe05f853c65d90ad769fa830b4f0.tar.bz2
gentoobrowse-api-0324c90dc754fe05f853c65d90ad769fa830b4f0.tar.xz
gentoobrowse-api-0324c90dc754fe05f853c65d90ad769fa830b4f0.zip
Remove unrequired wrapper functions
-rw-r--r--gentoobrowse-api/service/maintenance/categoryMetaProcessor.cpp11
-rw-r--r--gentoobrowse-api/service/maintenance/categoryMetaProcessor.h3
-rw-r--r--gentoobrowse-api/service/maintenance/packageMetaProcessor.cpp10
-rw-r--r--gentoobrowse-api/service/maintenance/packageMetaProcessor.h3
4 files changed, 5 insertions, 22 deletions
diff --git a/gentoobrowse-api/service/maintenance/categoryMetaProcessor.cpp b/gentoobrowse-api/service/maintenance/categoryMetaProcessor.cpp
index 31d2508..23d6699 100644
--- a/gentoobrowse-api/service/maintenance/categoryMetaProcessor.cpp
+++ b/gentoobrowse-api/service/maintenance/categoryMetaProcessor.cpp
@@ -15,12 +15,13 @@ namespace Gentoo {
void
CategoryMetaProcessor::created(DB::Connection * dbc, const boost::filesystem::path & fn, const boost::filesystem::path & path) const
{
- upsert(dbc->modify(sql::maintenance::categoryMetaUpdate::sql), fn, path);
+ modified(dbc, fn, path);
}
void
- CategoryMetaProcessor::upsert(DB::ModifyCommandPtr m, const boost::filesystem::path & fn, const boost::filesystem::path & path) const
+ CategoryMetaProcessor::modified(DB::Connection * dbc, const boost::filesystem::path & fn, const boost::filesystem::path & path) const
{
+ DB::ModifyCommandPtr m = dbc->modify(sql::maintenance::categoryMetaUpdate::sql);
U::XmlDoc md(path);
U::Database::bindOptionalsS(m.get(), 0, {
md.getXPathValue("/catmetadata/longdescription[@lang='en']/text()"),
@@ -31,12 +32,6 @@ namespace Gentoo {
}
void
- CategoryMetaProcessor::modified(DB::Connection * dbc, const boost::filesystem::path & fn, const boost::filesystem::path & path) const
- {
- upsert(dbc->modify(sql::maintenance::categoryMetaUpdate::sql), fn, path);
- }
-
- void
CategoryMetaProcessor::deleted(DB::Connection * dbc, const boost::filesystem::path & fn) const
{
auto m = dbc->modify(sql::maintenance::categoryMetaUpdate::sql);
diff --git a/gentoobrowse-api/service/maintenance/categoryMetaProcessor.h b/gentoobrowse-api/service/maintenance/categoryMetaProcessor.h
index b8c457e..e335cd8 100644
--- a/gentoobrowse-api/service/maintenance/categoryMetaProcessor.h
+++ b/gentoobrowse-api/service/maintenance/categoryMetaProcessor.h
@@ -15,9 +15,6 @@ namespace Gentoo {
void created(DB::Connection * dbc, const boost::filesystem::path & fn, const boost::filesystem::path & path) const;
void modified(DB::Connection * dbc, const boost::filesystem::path & fn, const boost::filesystem::path & path) const;
void deleted(DB::Connection * dbc, const boost::filesystem::path & fn) const;
-
- private:
- void upsert(DB::ModifyCommandPtr m, const boost::filesystem::path & fn, const boost::filesystem::path & path) const;
};
}
}
diff --git a/gentoobrowse-api/service/maintenance/packageMetaProcessor.cpp b/gentoobrowse-api/service/maintenance/packageMetaProcessor.cpp
index 5c67774..f0d9405 100644
--- a/gentoobrowse-api/service/maintenance/packageMetaProcessor.cpp
+++ b/gentoobrowse-api/service/maintenance/packageMetaProcessor.cpp
@@ -15,11 +15,11 @@ namespace Gentoo {
void
PackageMetaProcessor::created(DB::Connection * dbc, const boost::filesystem::path & fn, const boost::filesystem::path & path) const
{
- update(dbc, fn, path);
+ modified(dbc, fn, path);
}
void
- PackageMetaProcessor::update(DB::Connection * dbc, const boost::filesystem::path & fn, const boost::filesystem::path & path) const
+ PackageMetaProcessor::modified(DB::Connection * dbc, const boost::filesystem::path & fn, const boost::filesystem::path & path) const
{
auto m = dbc->modify(sql::maintenance::packageMetaUpdate::sql);
U::XmlDoc md(path);
@@ -36,12 +36,6 @@ namespace Gentoo {
}
void
- PackageMetaProcessor::modified(DB::Connection * dbc, const boost::filesystem::path & fn, const boost::filesystem::path & path) const
- {
- update(dbc, fn, path);
- }
-
- void
PackageMetaProcessor::deleted(DB::Connection * dbc, const boost::filesystem::path & fn) const
{
auto m = dbc->modify(sql::maintenance::packageMetaUpdate::sql);
diff --git a/gentoobrowse-api/service/maintenance/packageMetaProcessor.h b/gentoobrowse-api/service/maintenance/packageMetaProcessor.h
index fb5ffa7..44bb77e 100644
--- a/gentoobrowse-api/service/maintenance/packageMetaProcessor.h
+++ b/gentoobrowse-api/service/maintenance/packageMetaProcessor.h
@@ -14,9 +14,6 @@ namespace Gentoo {
void created(DB::Connection * dbc, const boost::filesystem::path & fn, const boost::filesystem::path & path) const;
void modified(DB::Connection * dbc, const boost::filesystem::path & fn, const boost::filesystem::path & path) const;
void deleted(DB::Connection * dbc, const boost::filesystem::path & fn) const;
-
- private:
- void update(DB::Connection * dbc, const boost::filesystem::path & fn, const boost::filesystem::path & path) const;
};
}
}