Database basic CRUD (#27)

* 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
This commit is contained in:
logan authored and GitHub committed 2025-04-16 13:45:44 -05:00
1 parent d062644a3e
commit b24e734ae3
36 files changed
+979 -5

No files matched your search

+17
View File
@@ -0,0 +1,17 @@
-- name: CreateArtist :one
INSERT INTO artists (name) VALUES (?)
RETURNING *;
-- name: GetArtist :one
SELECT * FROM artists
WHERE id = ? LIMIT 1;
-- name: UpdateArtist :exec
UPDATE artists
SET name = ?
WHERE id =?;
-- name: DeleteArtist :exec
DELETE FROM artists
WHERE id =?;