Made the sort case insensitive

This commit is contained in:
emeric
2018-09-24 13:08:39 +02:00
parent 87f1f1a13d
commit 9a019aaf3c
3 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -65,7 +65,7 @@ Artist::create(Wt::Dbo::Session& session, const std::string& name, const std::st
std::vector<Artist::pointer>
Artist::getAll(Wt::Dbo::Session& session, int offset, int size)
{
Wt::Dbo::collection<pointer> res = session.find<Artist>().orderBy("LOWER(name)").offset(offset).limit(size);
Wt::Dbo::collection<pointer> res = session.find<Artist>().offset(offset).limit(size);
return std::vector<pointer>(res.begin(), res.end());
}
@@ -107,7 +107,7 @@ getQuery(Wt::Dbo::Session& session,
if (!clusterIds.empty())
oss << " GROUP BY t.id HAVING COUNT(*) = " << clusterIds.size();
oss << " ORDER BY a.name";
oss << " ORDER BY a.name COLLATE NOCASE";
Wt::Dbo::Query<Artist::pointer> query = session.query<Artist::pointer>( oss.str() );