feat: search/merge items by id

This commit is contained in:
Gabe Farrell 2025-06-21 14:25:31 -04:00
parent 5537b6fb89
commit 1425f7f416
9 changed files with 752 additions and 46 deletions

View file

@ -4,7 +4,10 @@ VALUES ($1, $2, $3, $4)
RETURNING *;
-- name: GetRelease :one
SELECT * FROM releases_with_title
SELECT
*,
get_artists_for_release(id) AS artists
FROM releases_with_title
WHERE id = $1 LIMIT 1;
-- name: GetReleaseByMbzID :one

View file

@ -11,6 +11,7 @@ ON CONFLICT DO NOTHING;
-- name: GetTrack :one
SELECT
t.*,
get_artists_for_track(t.id) AS artists,
r.image
FROM tracks_with_title t
JOIN releases r ON t.release_id = r.id