mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-05-07 05:53:06 +00:00
Did FileContent db storage
This commit is contained in:
parent
b3d1d7f9bb
commit
5b328c01a8
1 changed files with 8 additions and 0 deletions
|
|
@ -142,6 +142,14 @@ MainDb::MainDb (const shared_ptr<Core> &core) : AbstractDb(*new MainDbPrivate),
|
|||
soci::use(content.getBodyAsString());
|
||||
|
||||
long long messageContentId = q->getLastInsertId();
|
||||
if (content.getContentType().isFile()) {
|
||||
const FileContent *fileContent = (const FileContent *)&content;
|
||||
*session << "INSERT INTO chat_message_file_content (chat_message_content_id, name, size, path) VALUES "
|
||||
" (:contentId, :name, :size, :path)",
|
||||
soci::use(messageContentId), soci::use(fileContent->getFileName()),
|
||||
soci::use(fileContent->getFileSize()), soci::use(fileContent->getFilePath());
|
||||
}
|
||||
|
||||
for (const auto &appData : content.getAppDataMap())
|
||||
*session << "INSERT INTO chat_message_content_app_data (chat_message_content_id, name, data) VALUES"
|
||||
" (:messageContentId, :name, :data)",
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue