first commit
Made-with: Cursor
This commit is contained in:
13
sqlc/queries/attachments.sql
Normal file
13
sqlc/queries/attachments.sql
Normal file
@@ -0,0 +1,13 @@
|
||||
-- name: ListAttachmentsByEvent :many
|
||||
SELECT id, event_id, file_url
|
||||
FROM event_attachments
|
||||
WHERE event_id = $1
|
||||
ORDER BY id ASC;
|
||||
|
||||
-- name: CreateAttachment :one
|
||||
INSERT INTO event_attachments (id, event_id, file_url)
|
||||
VALUES ($1, $2, $3)
|
||||
RETURNING id, event_id, file_url;
|
||||
|
||||
-- name: DeleteAttachment :exec
|
||||
DELETE FROM event_attachments WHERE id = $1 AND event_id = $2;
|
||||
Reference in New Issue
Block a user