Commit 44de3832 authored by Ronan's avatar Ronan
Browse files

fix(MainDb): do not use snake case

parent 4141af83
......@@ -516,14 +516,11 @@ MainDb::MainDb (const shared_ptr<Core> &core) : AbstractDb(*new MainDbPrivate),
content = new Content();
// 2.2 - Fetch contents' app data.
static const string content_app_data_query = "SELECT name, data FROM chat_message_content_app_data"
" WHERE chat_message_content_id = :messageContentId";
soci::rowset<soci::row> content_app_data_rows = (session->prepare << content_app_data_query, soci::use(contentId));
for (const auto &content_app_data_row : content_app_data_rows) {
string content_app_data_name(content_app_data_row.get<string>(0));
string content_app_data_value(content_app_data_row.get<string>(1));
content->setAppData(content_app_data_name, content_app_data_value);
}
static const string query = "SELECT name, data FROM chat_message_content_app_data"
" WHERE chat_message_content_id = :contentId";
soci::rowset<soci::row> rows = (session->prepare << query, soci::use(contentId));
for (const auto &row : rows)
content->setAppData(row.get<string>(0), row.get<string>(1));
content->setContentType(contentType);
content->setBody(row.get<string>(3));
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment