filter order was not properly being applied
gitea/salix/pipeline/head This commit looks good
Details
gitea/salix/pipeline/head This commit looks good
Details
This commit is contained in:
parent
3a2e4c54b6
commit
4ebad6b372
|
@ -48,13 +48,13 @@ module.exports = Self => {
|
|||
if (where && where.value) {
|
||||
stmt.merge(conn.makeWhere({value: {like: `%${where.value}%`}}));
|
||||
|
||||
const newStmt = new ParameterizedSQL(
|
||||
const orderStmt = new ParameterizedSQL(
|
||||
`ORDER BY value LIKE ? DESC,
|
||||
value LIKE ? DESC`, [
|
||||
where.value,
|
||||
`${where.value}%`
|
||||
]);
|
||||
ParameterizedSQL.append(newStmt, stmt);
|
||||
ParameterizedSQL.append(stmt, orderStmt);
|
||||
}
|
||||
|
||||
stmt.merge(conn.makeLimit(filter));
|
||||
|
|
Loading…
Reference in New Issue