-- name: CreateReceptionFormQRCode :one
INSERT INTO receptionform_qrcodes (
    receptionform_id,            
    qrcode
 ) VALUES (
     $1, 
     $2
    ) 
RETURNING *;

 -- name: GetReceptionFormQRCodes :one
SELECT * FROM receptionform_qrcodes
WHERE id = $1 LIMIT 1;

-- name: ListReceptionFormsQRCodes :many
SELECT * FROM receptionform_qrcodes
ORDER BY id LIMIT $1
OFFSET $2;

-- name: GetReceptionQRCodes :one
SELECT * FROM receptionform_qrcodes
WHERE receptionform_id = $1;

-- name: UpdateReceptionFormQRCodes :one
UPDATE receptionform_qrcodes
  set 
    receptionform_id=$2,            
    qrcode=$3
WHERE id = $1
RETURNING *;

-- name: DeleteReceptionFormQRcodes :exec
DELETE FROM receptionform_qrcodes WHERE id= $1;