База для ручки PostUserMedicationsExecutor.h

This commit is contained in:
2026-01-10 17:24:17 +03:00
parent 8eb44b6e45
commit a81952e40e
6 changed files with 17 additions and 10 deletions
+2 -5
View File
@@ -13,7 +13,7 @@ MySQLUserTreatmentSchemesDAO::MySQLUserTreatmentSchemesDAO(mysqlx::Session& sess
std::vector<user_treatment_scheme_dto> MySQLUserTreatmentSchemesDAO::FindByUserLogin(
const std::string& login)
{
const std::string query = R"(
static const std::string query = R"(
SELECT
uts.uuid,
uts.treatment_name,
@@ -28,10 +28,7 @@ std::vector<user_treatment_scheme_dto> MySQLUserTreatmentSchemesDAO::FindByUserL
ORDER BY uts.uuid
)";
mysqlx::SqlStatement stmt = session_.sql(query);
stmt.bind(login);
mysqlx::SqlResult result = stmt.execute();
mysqlx::SqlResult result = session_.sql(query).bind(login).execute();
std::unordered_map<std::string, user_treatment_scheme_dto> scheme_map;