| 92 | } |
| 93 | |
| 94 | bool CDatabaseFilter::isEmpty() |
| 95 | { |
| 96 | QSqlQuery query(GetDatabase()); |
| 97 | query.prepare("SELECT `key` FROM " + m_szTableName); |
| 98 | bool bRet = query.exec(); |
| 99 | if(!bRet) { |
| 100 | qCritical(log) << "Failed to isEmpty:" |
| 101 | << query.lastError().text() |
| 102 | << "Sql:" << query.executedQuery(); |
| 103 | return true; |
| 104 | } |
| 105 | return !query.next(); |
| 106 | } |
| 107 | |
| 108 | int CDatabaseFilter::OnProcess(std::function<int (const QString &)> cb, bool bErrExit) |
| 109 | { |
no outgoing calls
no test coverage detected