Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linphone
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
7
Issues
7
List
Board
Labels
Milestones
Merge Requests
10
Merge Requests
10
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
External Wiki
External Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
BC
public
linphone
Commits
5b328c01
Commit
5b328c01
authored
Nov 24, 2017
by
Sylvain Berfini
🎩
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Did FileContent db storage
parent
b3d1d7f9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
0 deletions
+8
-0
main-db.cpp
src/db/main-db.cpp
+8
-0
No files found.
src/db/main-db.cpp
View file @
5b328c01
...
@@ -142,6 +142,14 @@ MainDb::MainDb (const shared_ptr<Core> &core) : AbstractDb(*new MainDbPrivate),
...
@@ -142,6 +142,14 @@ MainDb::MainDb (const shared_ptr<Core> &core) : AbstractDb(*new MainDbPrivate),
soci
::
use
(
content
.
getBodyAsString
());
soci
::
use
(
content
.
getBodyAsString
());
long
long
messageContentId
=
q
->
getLastInsertId
();
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
())
for
(
const
auto
&
appData
:
content
.
getAppDataMap
())
*
session
<<
"INSERT INTO chat_message_content_app_data (chat_message_content_id, name, data) VALUES"
*
session
<<
"INSERT INTO chat_message_content_app_data (chat_message_content_id, name, data) VALUES"
" (:messageContentId, :name, :data)"
,
" (:messageContentId, :name, :data)"
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment