added IF NOT EXISTS to create and CRUD for each table

This commit is contained in:
2025-04-16 12:12:17 -05:00
parent faa25fe745
commit c20cac4015
18 changed files with 161 additions and 11 deletions
+16 -2
View File
@@ -1,3 +1,17 @@
-- name: GetAuthor :one
SELECT * FROM recordings
-- name: CreateRecording :one
INSERT INTO recordings (name) VALUES (?)
RETURNING *;
-- name: GetRecording :one
SELECT * FROM recordings
WHERE id = ? LIMIT 1;
-- name: UpdateRecording :exec
UPDATE recordings
SET name = ?
WHERE id =?;
-- name: DeleteRecording :exec
DELETE FROM recordings
WHERE id =?;