- query += " ORDER BY a.grouping,s.descr,b.volume,b.title,b.path"
+ switch sort {
+ case ByArrival:
+ query += " ORDER BY b.arrived DESC,a.grouping,s.descr,b.volume,b.title,b.path"
+ case ByAuthor:
+ query += " ORDER BY a.grouping,s.descr,b.volume,b.title,b.path,b.arrived DESC"
+ case ByPublication:
+ report("Error: cannot sort by publication (not yet implemented)", nil)
+ return nil
+ case ByTitle:
+ query += " ORDER BY b.title,a.grouping,s.descr,b.volume,b.path,b.arrived DESC"
+ default:
+ report("Error: unrecognized sort order in queryIds(): " + sort.String(), nil)
+ return nil
+ }