feat: now PostImage return Image struct even on duplicate data
This commit is contained in:
parent
c58b578023
commit
4fe077d229
3 changed files with 55 additions and 29 deletions
|
|
@ -3,6 +3,11 @@ SELECT id, storage_type, image_path
|
|||
FROM images
|
||||
WHERE id = sqlc.arg('illust_id')::bigint;
|
||||
|
||||
-- name: GetImageByPath :one
|
||||
SELECT id, storage_type, image_path
|
||||
FROM images
|
||||
WHERE image_path = sqlc.arg('illust_path')::text;
|
||||
|
||||
-- name: CreateImage :one
|
||||
INSERT INTO images (storage_type, image_path)
|
||||
VALUES ($1, $2)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue