refs #5051 sub stmt
gitea/salix/pipeline/head There was a failure building this commit Details

This commit is contained in:
Alexandre Riera 2023-01-03 10:36:31 +01:00
parent 0ae76746ae
commit 04d3d13e82
1 changed files with 3 additions and 2 deletions

View File

@ -29,10 +29,11 @@ module.exports = Self => {
filter = mergeFilters(filter, {where});
const stmt = new ParameterizedSQL(
`SELECT * FROM campaign`);
`SELECT * FROM (`);
stmt.merge('SELECT * FROM campaign');
stmt.merge(conn.makeWhere(filter.where));
stmt.merge('ORDER BY dated ASC) sub');
stmt.merge('GROUP BY code');
stmt.merge('ORDER BY dated ASC');
stmt.merge('LIMIT 10000000000000000000');
stmt.merge(conn.makePagination(filter));