void PostgreSqlStorage::setBufferLastSeenMsg(UserId user, const BufferId &bufferId, const MsgId &msgId)
{
    QSqlQuery query(logDb());
    query.prepare(queryString("update_buffer_lastseen"));

    query.bindValue(":userid", user.toInt());
    query.bindValue(":bufferid", bufferId.toInt());
    query.bindValue(":lastseenmsgid", msgId.toInt());
    safeExec(query);
    watchQuery(query);
}
void PostgreSqlStorage::setBufferLastSeenMsg(UserId user, const BufferId &bufferId, const MsgId &msgId)
{
    QSqlQuery query(logDb());
    query.prepare(queryString("update_buffer_lastseen"));

    query.bindValue(":userid", user.toInt());
    query.bindValue(":bufferid", bufferId.toInt());
    query.bindValue(":lastseenmsgid", msgId.toInt());
    safeExec(query);
    watchQuery(query);
}