Commit a0b59e43 authored by Ronan's avatar Ronan

feat(MainDbPrivate): add one insertConferenceEvent method

parent d64b2adf
......@@ -43,6 +43,10 @@ class MainDbPrivate : public AbstractDbPrivate {
public:
private:
// ---------------------------------------------------------------------------
// Low level API.
// ---------------------------------------------------------------------------
long insertSipAddress (const std::string &sipAddress);
void insertContent (long messageEventId, const Content &content);
long insertContentType (const std::string &contentType);
......@@ -61,6 +65,8 @@ private:
void insertMessageParticipant (long messageEventId, long sipAddressId, ChatMessage::State state);
void insertConferenceEvent (long eventId, long chatRoomId);
std::unordered_map<std::string, std::weak_ptr<ChatRoom>> chatRooms;
L_DECLARE_PUBLIC(MainDb);
......
......@@ -236,6 +236,12 @@ MainDb::MainDb () : AbstractDb(*new MainDbPrivate) {}
soci::use(messageEventId), soci::use(sipAddressId), soci::use(static_cast<int>(state));
}
void MainDbPrivate::insertConferenceEvent (long eventId, long chatRoomId) {
soci::session *session = dbSession.getBackendSession<soci::session>();
*session << "INSERT INTO conference_event (event_id, chat_room_id) VALUES (:eventId, :chatRoomId)",
soci::use(eventId), soci::use(chatRoomId);
}
// -----------------------------------------------------------------------------
#define LEGACY_MESSAGE_COL_LOCAL_ADDRESS 1
......
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