Commit 429cba5d authored by Ronan's avatar Ronan
Browse files

feat(EventsDb): add cleanEvents impl

parent 814d279f
......@@ -498,13 +498,22 @@ EventsDb::EventsDb () : AbstractDb(*new EventsDbPrivate) {}
}
void EventsDb::cleanEvents (FilterMask mask) {
L_D();
if (!isConnected()) {
lWarning() << "Unable to clean events. Not connected.";
return;
}
// TODO.
(void)mask;
string query = "DELETE FROM event" +
buildSqlEventFilter({ MessageFilter, CallFilter, ConferenceFilter }, mask);
L_BEGIN_LOG_EXCEPTION
soci::session *session = d->dbSession.getBackendSession<soci::session>();
*session << query;
L_END_LOG_EXCEPTION
}
int EventsDb::getEventsCount (FilterMask mask) const {
......
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