mirror of
https://github.com/austinried/subtracks.git
synced 2026-11-10 15:11:58 +01:00
Replace the thirty hand-written order variants with one query builder per entity plus a default and a downloaded @RawQuery entry point. The repository's sort dispatch trees and the duplicated positional filters in LibraryPaging are gone, and the SQL now lives in multi-line strings with named parameters. The generated statements are identical to the previous ones modulo whitespace: the downloaded variants keep the same CASE/download conditions, and the observed entities match what Room inferred for the old queries. A small helper rewrites the named parameters to RoomRawQuery's positional form, including the repeated :sourceId bindings.