-- name: CreateRejection :one
INSERT INTO rejections (
    rejectioncode,
    rejectiondescription
 ) VALUES (
    $1, $2
 ) RETURNING *;

-- name: GetRejection :one
SELECT * FROM rejections
WHERE id = $1 LIMIT 1;

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

-- name: UpdateRejection :one
UPDATE rejections
  set 
    rejectioncode= $2,
    rejectiondescription= $3
WHERE id = $1
RETURNING *;

-- name: DeleteRejection :exec
DELETE FROM rejections WHERE id= $1;