reinholdk wrote:
> Are you saying that it's not possible to use COLLATE with GROUP BY or
> that it's not working?
Here's what I got in my testing (I even updated to the latest and
greatest DBD::SQLite version):
Code:
--------------------
[14-08-05 16:00:03.5169] Slim::Control::Queries::artistsQuery (997) Artists
query Index: SELECT SUBSTR(contributors.namesort,1,1), count(distinct
contributors.id)
FROM contributors
JOIN contributor_album ON contributor_album.contributor = contributors.id
JOIN albums ON contributor_album.album = albums.id
WHERE (contributor_album.role IN (1,4,5) ) AND (albums.compilation IS NULL
OR albums.compilation = 0)
GROUP BY SUBSTR(contributors.namesort,1,1)
ORDER BY contributors.namesort COLLATE de_DE / []
[14-08-05 16:00:03.5209] Slim::Utils::Misc::msg (1312) Warning:
[16:00:03.5207] [
[5, 1],
["\xC3\x85", 1],
["A", 15],
["B", 20],
["C", 19],
(...)
] at /Users/mh/git/server/Slim/Control/Queries.pm line 1002.
[14-08-05 16:00:03.5238] Slim::Control::Queries::artistsQuery (1079) Artists
query: SELECT contributors.id, contributors.name, contributors.namesort
FROM contributors
JOIN contributor_album ON contributor_album.contributor = contributors.id
JOIN albums ON contributor_album.album = albums.id
WHERE (contributor_album.role IN (1,4,5) ) AND (albums.compilation IS NULL
OR albums.compilation = 0)
GROUP BY contributors.id
ORDER BY contributors.namesort COLLATE de_DE LIMIT 0, 56 / []
[14-08-05 16:00:03.5260] Slim::Control::Queries::__ANON__ (1097) Error:
DIVERSE INTERPRETEN
[14-08-05 16:00:03.5263] Slim::Control::Queries::__ANON__ (1097) Error: 5 6 7
8 S
[14-08-05 16:00:03.5267] Slim::Control::Queries::__ANON__ (1097) Error: A
FINE FRENZY
[14-08-05 16:00:03.5270] Slim::Control::Queries::__ANON__ (1097) Error: Å
NIKKI YANOFSKY
[14-08-05 16:00:03.5274] Slim::Control::Queries::__ANON__ (1097) Error: ABBA
[14-08-05 16:00:03.5280] Slim::Control::Queries::__ANON__ (1097) Error: ADELE
[14-08-05 16:00:03.5283] Slim::Control::Queries::__ANON__ (1097) Error:
ALANIS MORISSETTE
--------------------
As you can see, in the query grouped by namesort "\xC3\x85" would be its
own item, thus creating its own letter in the index bar. Whereas the
real query would put it with all the As in the list. I'm no SQLite
expert, thus might be missing the obvious. But I'd say we're applying
the same collation there.
Michael
http://www.herger.net/slim-plugins - MusicArtistInfo, MusicInfoSCR,
Smart Mix
------------------------------------------------------------------------
mherger's Profile: http://forums.slimdevices.com/member.php?userid=50
View this thread: http://forums.slimdevices.com/showthread.php?t=101264
_______________________________________________
beta mailing list
[email protected]
http://lists.slimdevices.com/mailman/listinfo/beta