mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-04-25 02:08:32 +00:00
fix(MainDb): remote static qualifier of query in getEventCount
This commit is contained in:
parent
c5cfbc5892
commit
d2c6e3fcf4
1 changed files with 8 additions and 8 deletions
|
|
@ -783,12 +783,12 @@ MainDb::MainDb (const shared_ptr<Core> &core) : AbstractDb(*new MainDbPrivate),
|
||||||
soci::session *session = dbSession.getBackendSession<soci::session>();
|
soci::session *session = dbSession.getBackendSession<soci::session>();
|
||||||
const int &state = static_cast<int>(chatMessage->getState());
|
const int &state = static_cast<int>(chatMessage->getState());
|
||||||
const string &imdnMessageId = chatMessage->getImdnMessageId();
|
const string &imdnMessageId = chatMessage->getImdnMessageId();
|
||||||
*session << "UPDATE conference_chat_message_event SET state = :state, imdn_message_id = :imdnMessageId WHERE event_id = :eventId",
|
*session << "UPDATE conference_chat_message_event SET state = :state, imdn_message_id = :imdnMessageId"
|
||||||
|
" WHERE event_id = :eventId",
|
||||||
soci::use(state), soci::use(imdnMessageId), soci::use(eventId);
|
soci::use(state), soci::use(imdnMessageId), soci::use(eventId);
|
||||||
|
|
||||||
//TODO: improve
|
|
||||||
deleteContents(eventId);
|
deleteContents(eventId);
|
||||||
for (const Content *content : chatMessage->getContents())
|
for (const auto &content : chatMessage->getContents())
|
||||||
insertContent(eventId, *content);
|
insertContent(eventId, *content);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -802,7 +802,7 @@ MainDb::MainDb (const shared_ptr<Core> &core) : AbstractDb(*new MainDbPrivate),
|
||||||
|
|
||||||
soci::session *session = dbSession.getBackendSession<soci::session>();
|
soci::session *session = dbSession.getBackendSession<soci::session>();
|
||||||
*session << "INSERT INTO conference_notified_event (event_id, notify_id)"
|
*session << "INSERT INTO conference_notified_event (event_id, notify_id)"
|
||||||
" VALUES (:eventId, :notifyId)", soci::use(eventId), soci::use(lastNotifyId);
|
" VALUES (:eventId, :notifyId)", soci::use(eventId), soci::use(lastNotifyId);
|
||||||
*session << "UPDATE chat_room SET last_notify_id = :lastNotifyId WHERE id = :chatRoomId",
|
*session << "UPDATE chat_room SET last_notify_id = :lastNotifyId WHERE id = :chatRoomId",
|
||||||
soci::use(lastNotifyId), soci::use(curChatRoomId);
|
soci::use(lastNotifyId), soci::use(curChatRoomId);
|
||||||
|
|
||||||
|
|
@ -881,7 +881,7 @@ MainDb::MainDb (const shared_ptr<Core> &core) : AbstractDb(*new MainDbPrivate),
|
||||||
|
|
||||||
soci::session *session = dbSession.getBackendSession<soci::session>();
|
soci::session *session = dbSession.getBackendSession<soci::session>();
|
||||||
*session << "INSERT INTO conference_participant_device_event (event_id, device_sip_address_id)"
|
*session << "INSERT INTO conference_participant_device_event (event_id, device_sip_address_id)"
|
||||||
" VALUES (:eventId, :deviceAddressId)", soci::use(eventId), soci::use(deviceAddressId);
|
" VALUES (:eventId, :deviceAddressId)", soci::use(eventId), soci::use(deviceAddressId);
|
||||||
|
|
||||||
switch (eventLog->getType()) {
|
switch (eventLog->getType()) {
|
||||||
case EventLog::Type::ConferenceParticipantDeviceAdded:
|
case EventLog::Type::ConferenceParticipantDeviceAdded:
|
||||||
|
|
@ -909,10 +909,10 @@ MainDb::MainDb (const shared_ptr<Core> &core) : AbstractDb(*new MainDbPrivate),
|
||||||
|
|
||||||
soci::session *session = dbSession.getBackendSession<soci::session>();
|
soci::session *session = dbSession.getBackendSession<soci::session>();
|
||||||
*session << "INSERT INTO conference_subject_event (event_id, subject)"
|
*session << "INSERT INTO conference_subject_event (event_id, subject)"
|
||||||
" VALUES (:eventId, :subject)", soci::use(eventId), soci::use(subject);
|
" VALUES (:eventId, :subject)", soci::use(eventId), soci::use(subject);
|
||||||
|
|
||||||
*session << "UPDATE chat_room SET subject = :subject"
|
*session << "UPDATE chat_room SET subject = :subject"
|
||||||
" WHERE id = :chatRoomId", soci::use(subject), soci::use(chatRoomId);
|
" WHERE id = :chatRoomId", soci::use(subject), soci::use(chatRoomId);
|
||||||
|
|
||||||
return eventId;
|
return eventId;
|
||||||
}
|
}
|
||||||
|
|
@ -1433,7 +1433,7 @@ MainDb::MainDb (const shared_ptr<Core> &core) : AbstractDb(*new MainDbPrivate),
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static string query = "SELECT COUNT(*) FROM event" +
|
string query = "SELECT COUNT(*) FROM event" +
|
||||||
buildSqlEventFilter({ ConferenceCallFilter, ConferenceChatMessageFilter, ConferenceInfoFilter }, mask);
|
buildSqlEventFilter({ ConferenceCallFilter, ConferenceChatMessageFilter, ConferenceInfoFilter }, mask);
|
||||||
int count = 0;
|
int count = 0;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue