sqlitedbservice,indexer: Add runWalCheckpoint() and call it after indexing
Šī revīzija ir iekļauta:
vecāks
d85c0bd2a5
revīzija
fc510b4376
@ -163,6 +163,7 @@ void Indexer::processFinishedWorker()
|
|||||||
--this->runningWorkers;
|
--this->runningWorkers;
|
||||||
if(!isRunning())
|
if(!isRunning())
|
||||||
{
|
{
|
||||||
|
this->db->runWalCheckpoint();
|
||||||
emit finished();
|
emit finished();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -276,6 +276,12 @@ bool SqliteDbService::insertOutline(QSqlDatabase &db, int fileid, const QVector<
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool SqliteDbService::runWalCheckpoint()
|
||||||
|
{
|
||||||
|
auto query = QSqlQuery(dbFactory->forCurrentThread());
|
||||||
|
return query.exec("PRAGMA wal_checkpoint(TRUNCATE);");
|
||||||
|
}
|
||||||
|
|
||||||
QSqlQuery SqliteDbService::exec(QString querystr, std::initializer_list<QVariant> args)
|
QSqlQuery SqliteDbService::exec(QString querystr, std::initializer_list<QVariant> args)
|
||||||
{
|
{
|
||||||
auto query = QSqlQuery(dbFactory->forCurrentThread());
|
auto query = QSqlQuery(dbFactory->forCurrentThread());
|
||||||
|
Notiek ielāde…
Atsaukties uz šo jaunā problēmā
Block a user