Files
yellowjacket/backend/database/sql/queries/artists.sql
T
yonlu 81793975b4 improved library scan speeds, added library manager component
-libraries tab now opens a library manager
-choose library directory, manually soft scan and rescan
-batched db queues
-mp3 header-based duration extraction
2026-02-19 10:17:09 -05:00

33 lines
614 B
SQL

-- name: CreateArtist :one
INSERT INTO artists (name) VALUES (?)
RETURNING *;
-- name: GetArtist :one
SELECT * FROM artists
WHERE id = ? LIMIT 1;
-- name: GetArtistByName :one
SELECT * FROM artists
WHERE name = ? LIMIT 1;
-- name: UpsertArtist :one
INSERT INTO artists (name) VALUES (?)
ON CONFLICT(name) DO UPDATE SET name = excluded.name
RETURNING *;
-- name: UpdateArtist :exec
UPDATE artists
SET name = ?
WHERE id = ?;
-- name: DeleteArtist :exec
DELETE FROM artists
WHERE id = ?;
-- name: DeleteAllArtists :exec
DELETE FROM artists;
-- name: GetAllArtists :many
SELECT * FROM artists
ORDER BY name;