go-project-template/db/queries/example.sql
2024-05-05 15:10:32 -07:00

11 lines
254 B
SQL

-- name: ExampleCreate :exec
INSERT INTO example (name) VALUES ($1);
-- name: ExampleGetByID :one
SELECT * FROM example WHERE id = $1;
-- name: ExampleGetAll :many
SELECT * FROM example;
-- name: ExampleDelete :exec
DELETE FROM example WHERE id = $1;