mirror of
https://github.com/navidrome/navidrome.git
synced 2025-04-04 21:17:37 +03:00
Order albums by full original date. Fixes #1452
This commit is contained in:
parent
11f33ff8b6
commit
7d0656f44a
3 changed files with 12 additions and 6 deletions
|
@ -69,6 +69,10 @@ var _ = Describe("sqlRepository", func() {
|
|||
sql := r.buildSortOrder("name desc, substr(id, 7), status asc", "desc")
|
||||
Expect(sql).To(Equal("name asc, substr(id, 7) desc, status desc"))
|
||||
})
|
||||
It("handles nested functions", func() {
|
||||
sql := r.buildSortOrder("name desc, coalesce(nullif(release_date, ''), nullif(original_date, '')), status asc", "desc")
|
||||
Expect(sql).To(Equal("name asc, coalesce(nullif(release_date, ''), nullif(original_date, '')) desc, status desc"))
|
||||
})
|
||||
})
|
||||
})
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue