diff options
author | Jamie Fraser <jamie.f@mumbledog.com> | 2011-04-11 23:31:13 +0400 |
---|---|---|
committer | Stefan Hacker <dd0t@users.sourceforge.net> | 2011-04-24 19:36:36 +0400 |
commit | fa7a412e2415c31afa321cc9749948e08e16f4df (patch) | |
tree | 66bf3f8e19b3047c061c90d65ceed62730922ab8 /src/murmur/ServerDB.cpp | |
parent | 23e39992889aa1d21eeb08197c7b1310605d5e7a (diff) |
Added option -wipelogs to clear logs in DB.
Diffstat (limited to 'src/murmur/ServerDB.cpp')
-rw-r--r-- | src/murmur/ServerDB.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/murmur/ServerDB.cpp b/src/murmur/ServerDB.cpp index e9dc99901..185e6392d 100644 --- a/src/murmur/ServerDB.cpp +++ b/src/murmur/ServerDB.cpp @@ -1598,6 +1598,13 @@ void Server::dblog(const QString &str) { SQLEXEC(); } +void ServerDB::wipeLogs() { + TransactionHolder th; + QSqlQuery &query = *th.qsqQuery; + + SQLDO("DELETE FROM %1slog"); +} + QList<QPair<unsigned int, QString> > ServerDB::getLog(int server_id, unsigned int offs_min, unsigned int offs_max) { TransactionHolder th; QSqlQuery &query = *th.qsqQuery; |