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
@@ -36,3 +36,6 @@ SELECT * FROM tracks
WHERE title ILIKE '%' || $1 || '%'
ORDER BY title
LIMIT $2 OFFSET $3;
-- name: CountTracksMatching :one
SELECT COUNT(*) FROM tracks WHERE title ILIKE '%' || $1::text || '%';