fix(db/m7-352): cast COALESCE to uuid so sqlc emits typed return
This commit is contained in:
@@ -86,6 +86,7 @@ SELECT t.id
|
||||
-- "Songs like X" seed selection. Returns the user's most-played non-skipped
|
||||
-- track by artist X in the last 7 days. Falls back to the artist's most-
|
||||
-- recent album's first track if no plays exist.
|
||||
-- Cast to uuid so sqlc infers pgtype.UUID rather than interface{}.
|
||||
SELECT COALESCE(
|
||||
(SELECT t.id
|
||||
FROM play_events pe
|
||||
@@ -106,7 +107,7 @@ SELECT COALESCE(
|
||||
t.track_number NULLS LAST,
|
||||
t.id
|
||||
LIMIT 1)
|
||||
);
|
||||
)::uuid AS id;
|
||||
|
||||
-- name: PickTopAlbumCoverForArtistByUser :one
|
||||
-- "Songs like X" cover. Most-played album by user; tie-break by most-recent
|
||||
|
||||
Reference in New Issue
Block a user