-- name: CreateQcp1Recommendation :one
INSERT INTO qcp1_recommendation (
    qcp1_id,
    status,
    netweightrejected,
    netweightpassed,
    other
 ) VALUES (
     $1, 
     $2, 
     $3,
     $4,
     $5
    ) 
RETURNING *;

-- name: GetQcp1Recommendation :one
SELECT * FROM qcp1_recommendation
WHERE qcp1_id = $1 LIMIT 1;

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

-- name: UpdateQcp1Recommendation :one
UPDATE qcp1_recommendation
  set 
     qcp1_id = $2,
     status = $3,
     netweightrejected = $4,
     netweightpassed = $5,
     other  = $6
WHERE id = $1
RETURNING *;

-- name: DeleteQcp1Recommendation :exec
DELETE FROM qcp1_recommendation WHERE id= $1;