1 커밋

작성자 SHA1 메시지 날짜
a9d3f7897a shared: sqlitedbservice: Introduce exec(),execBool(). Refactor 2023-03-26 15:39:23 +02:00
2개의 변경된 파일2개의 추가작업 그리고 14개의 파일을 삭제

파일 보기

@ -25,22 +25,10 @@ SaveFileResult FileSaver::addFile(QString path)
QString absPath = info.absoluteFilePath(); QString absPath = info.absoluteFilePath();
auto mtime = info.lastModified().toSecsSinceEpoch(); auto mtime = info.lastModified().toSecsSinceEpoch();
if(this->dbService->fileExistsInDatabase(absPath, mtime))
bool exists = false;
if(this->fileSaverOptions.fillExistingContentless)
{
exists = this->dbService->fileExistsInDatabase(absPath, mtime, 'c');
}
else
{
exists = this->dbService->fileExistsInDatabase(absPath, mtime);
}
if(exists)
{ {
return SKIPPED; return SKIPPED;
} }
return saveFile(info); return saveFile(info);
} }

파일 보기

@ -151,7 +151,7 @@ QSqlQuery SqliteDbService::exec(QString querystr, std::initializer_list<QVariant
} }
if(!query.exec()) if(!query.exec())
{ {
throw LooqsGeneralException("Error while exec(): " + query.lastError().text()); throw LooqsGeneralException("Error while trying to query for file existance: " + query.lastError().text());
} }
return query; return query;
} }