shared: sqlitedbservice: Call prepare(), don't pass query in constructor for consistency
This commit is contained in:
parent
c99827e854
commit
e8f095f821
@ -7,7 +7,8 @@
|
|||||||
#include "logger.h"
|
#include "logger.h"
|
||||||
bool SqliteDbService::fileExistsInDatabase(QString path, qint64 mtime)
|
bool SqliteDbService::fileExistsInDatabase(QString path, qint64 mtime)
|
||||||
{
|
{
|
||||||
auto query = QSqlQuery("SELECT 1 FROM file WHERE path = ? and mtime = ?", dbFactory->forCurrentThread());
|
auto query = QSqlQuery(dbFactory->forCurrentThread());
|
||||||
|
query.prepare("SELECT 1 FROM file WHERE path = ? and mtime = ?");
|
||||||
query.addBindValue(path);
|
query.addBindValue(path);
|
||||||
query.addBindValue(mtime);
|
query.addBindValue(mtime);
|
||||||
if(!query.exec())
|
if(!query.exec())
|
||||||
|
Loading…
Reference in New Issue
Block a user