looqs/shared/sqlitesearch.h

24 satır
573 B
C
Ham Normal Görünüm Geçmiş

#ifndef SQLITESEARCH_H
#define SQLITESEARCH_H
#include <QSqlDatabase>
#include <QPair>
#include "searchresult.h"
#include "token.h"
2021-06-12 14:59:58 +02:00
#include "../shared/looqsquery.h"
class SqliteSearch
{
public:
SqliteSearch(QSqlDatabase &db);
2021-06-12 14:59:58 +02:00
QVector<SearchResult> search(const LooqsQuery &query);
private:
QSqlDatabase *db;
2021-06-12 14:59:58 +02:00
QSqlQuery makeSqlQuery(const LooqsQuery &query);
QString fieldToColumn(QueryField field);
QPair<QString, QVector<QString>> createSql(const Token &token);
QString createSortSql(const QVector<SortCondition> sortConditions);
};
#endif // SQLITESEARCH_H