add make_query without params

This commit is contained in:
chatlanin
2022-12-14 10:45:43 +03:00
parent 9246c12ebc
commit ebdf386ba2
2 changed files with 14 additions and 1 deletions

View File

@@ -42,7 +42,6 @@ namespace hack::utils
inline std::string make_one(json f)
{
std::string f_str = nlohmann::to_string(f);
// f_str.erase(std::remove(f_str.begin(), f_str.end(), '\''), f_str.end());
f_str = std::regex_replace(f_str, std::regex("'"), "[quote]");
return hack::string::str_concat + "'" + f_str + "'::jsonb,";
@@ -70,4 +69,9 @@ namespace hack::utils
return query;
}
std::string make_query(const std::string func)
{
std::string query = "SELECT s_func." + func + "();";
return query;
}
}