* started schema * db schemas beginning * first db schema gen * added sqlc generation with go generate and sqlite driver * i think these dependencies are needed * added IF NOT EXISTS to create and CRUD for each table * fixed missing columns * added missing field * fixed code generation with sqlc
18 lines
307 B
SQL
18 lines
307 B
SQL
-- 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 =?;
|
|
|