feat(db): add paged + count queries for library reads

This commit is contained in:
2026-04-21 00:01:15 -04:00
parent 62e48642e2
commit fb49a39492
6 changed files with 136 additions and 0 deletions
+3
View File
@@ -53,3 +53,6 @@ SELECT * FROM albums
WHERE title ILIKE '%' || $1 || '%'
ORDER BY sort_title
LIMIT $2 OFFSET $3;
-- name: CountAlbumsMatching :one
SELECT COUNT(*) FROM albums WHERE title ILIKE '%' || $1::text || '%';