fix: delete views column
This commit is contained in:
parent
e2ac80610c
commit
9c0fada00e
2 changed files with 4 additions and 4 deletions
|
|
@ -321,13 +321,13 @@ ORDER BY
|
|||
WHEN $6::boolean AND $7::text = 'id' THEN id
|
||||
WHEN $6::boolean AND $7::text = 'year' THEN release_year
|
||||
WHEN $6::boolean AND $7::text = 'rating' THEN rating
|
||||
WHEN $6::boolean AND $7::text = 'views' THEN views
|
||||
-- WHEN sqlc.arg(forward)::boolean AND sqlc.arg(sort_by)::text = 'views' THEN views
|
||||
END ASC,
|
||||
CASE
|
||||
WHEN NOT $6::boolean AND $7::text = 'id' THEN id
|
||||
WHEN NOT $6::boolean AND $7::text = 'year' THEN release_year
|
||||
WHEN NOT $6::boolean AND $7::text = 'rating' THEN rating
|
||||
WHEN NOT $6::boolean AND $7::text = 'views' THEN views
|
||||
-- WHEN NOT sqlc.arg(forward)::boolean AND sqlc.arg(sort_by)::text = 'views' THEN views
|
||||
END DESC,
|
||||
|
||||
-- Вторичный ключ: id — только если НЕ сортируем по id
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue