fix(postcode_filter): add limit
gitea/salix/pipeline/pr-master There was a failure building this commit Details

This commit is contained in:
Alex Moreno 2024-07-30 08:59:03 +02:00
parent 434dfe4ae4
commit dbe0f4497c
1 changed files with 2 additions and 0 deletions

View File

@ -67,10 +67,12 @@ module.exports = Self => {
`);
stmt.merge(conn.makeSuffix({where}));
stmt.merge(conn.makeLimit(filter));
const itemsIndex = stmts.push(stmt) - 1;
const sql = ParameterizedSQL.join(stmts, ';');
const result = await conn.executeStmt(sql, myOptions);
return itemsIndex === 0 ? result : result[itemsIndex];
};
};