GraphQL API and utilities for the rpdata project
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

15 lines
352 B

-- name: SelectKey :one
SELECT * FROM "key" WHERE id=$1 LIMIT 1;
-- name: SelectKeys :many
SELECT * FROM "key";
-- name: SelectKeysByUser :many
SELECT * FROM "key" WHERE "user" = $1;
-- name: InsertKey :exec
INSERT INTO key (id, name, "user", secret)
VALUES (@id, @name, @user_id, @secret);
-- name: DeleteKey :exec
DELETE FROM "key" WHERE id = $1;