Refactor search queries: Introduced QSSQuery

Purpose is to seperate certain logic from SQLite and generalize it more.
Even though we only have Sqlite atm, in general the database layers
must be stupid as possible, while QSSQuery should do most of the hard work.

Fixes in Tokenizer logic.
Switched to C++17.
This commit is contained in:
2019-08-17 11:06:35 +02:00
parent ef6485117b
commit 404f05b89f
14 changed files with 504 additions and 620 deletions

View File

@ -3,7 +3,6 @@
#include "databasefactory.h"
#include "logger.h"
int CommandSearch::handle(QStringList arguments)
{
QCommandLineParser parser;
@ -25,8 +24,7 @@ int CommandSearch::handle(QStringList arguments)
QStringList files = parser.positionalArguments();
QString queryStrings = files.join(' ');
auto results = dbService->search(queryStrings);
auto results = dbService->search(QSSQuery::build(queryStrings));
for(SearchResult &result : results)
{