refs #6667 fix limit
gitea/salix/pipeline/head This commit looks good Details

This commit is contained in:
Carlos Satorres 2024-01-17 14:07:04 +01:00
parent d47429b4a7
commit d1a3c67d2e
1 changed files with 9 additions and 8 deletions

View File

@ -42,14 +42,15 @@ module.exports = Self => {
const stmt = new ParameterizedSQL(`
SELECT *
FROM(
SELECT w.id, w.code, u.name, u.nickname, u.active, b.departmentFk
FROM worker w
JOIN account.user u ON u.id = w.id
LEFT JOIN business b ON b.workerFk = w.id
ORDER BY b.id DESC
) w
GROUP BY w.id`);
FROM(
SELECT w.id, w.code, u.name, u.nickname, u.active, b.departmentFk
FROM worker w
JOIN account.user u ON u.id = w.id
LEFT JOIN business b ON b.workerFk = w.id
ORDER BY b.id DESC
LIMIT 10000000000000000000
) w
GROUP BY w.id`);
stmt.merge(conn.makeSuffix(filter));
return conn.executeStmt(stmt);