diff options
Diffstat (limited to 'gentoobrowse-api/service/utils/splitEbuildProps.cpp')
-rw-r--r-- | gentoobrowse-api/service/utils/splitEbuildProps.cpp | 36 |
1 files changed, 16 insertions, 20 deletions
diff --git a/gentoobrowse-api/service/utils/splitEbuildProps.cpp b/gentoobrowse-api/service/utils/splitEbuildProps.cpp index ec9df6b..f9e1b6e 100644 --- a/gentoobrowse-api/service/utils/splitEbuildProps.cpp +++ b/gentoobrowse-api/service/utils/splitEbuildProps.cpp @@ -3,27 +3,23 @@ #include <buffer.h> #include <command.h> -namespace Gentoo { - namespace Utils { - SplitEbuildProps::SplitEbuildProps( - const std::string & ce, int64_t e, const std::string & cp, const std::optional<Glib::ustring> & p) : - entityId(e), - colEntityName(ce), colPropName(cp), props(p) - { - } +namespace Gentoo::Utils { + SplitEbuildProps::SplitEbuildProps(std::string ce, int64_t e, std::string cp, std::optional<Glib::ustring> p) : + entityId(e), colEntityName(std::move(ce)), colPropName(std::move(cp)), props(std::move(p)) + { + } - void - SplitEbuildProps::writeSql(AdHoc::Buffer & sql) - { - sql.appendbf("(SELECT DISTINCT ?::int %s, trim(regexp_split_to_table(?, '\\s+'), '+') %s)", colEntityName, - colPropName); - } + void + SplitEbuildProps::writeSql(AdHoc::Buffer & sql) + { + sql.appendbf("(SELECT DISTINCT ?::int %s, trim(regexp_split_to_table(?, '\\s+'), '+') %s)", colEntityName, + colPropName); + } - void - SplitEbuildProps::bindParams(DB::Command * c, unsigned int & offset) - { - c->bindParamI(offset++, entityId); - c->bindParamS(offset++, props); - } + void + SplitEbuildProps::bindParams(DB::Command * c, unsigned int & offset) + { + c->bindParamI(offset++, entityId); + c->bindParamS(offset++, props); } } |