shared: SqliteSearch: Append LIMIT statement if need be
This commit is contained in:
parent
862168418b
commit
e5e43c8bfb
@ -183,6 +183,11 @@ QSqlQuery SqliteSearch::makeSqlQuery(const LooqsQuery &query)
|
|||||||
whereSql + " " + sortSql;
|
whereSql + " " + sortSql;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(query.getLimit() > 0)
|
||||||
|
{
|
||||||
|
prepSql += " LIMIT " + QString::number(query.getLimit());
|
||||||
|
}
|
||||||
|
|
||||||
QSqlQuery dbquery(*db);
|
QSqlQuery dbquery(*db);
|
||||||
dbquery.prepare(prepSql);
|
dbquery.prepare(prepSql);
|
||||||
for(const QString &value : bindValues)
|
for(const QString &value : bindValues)
|
||||||
|
Loading…
Reference in New Issue
Block a user