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.
22 lines
579 B
22 lines
579 B
-- name: ListStats :many
|
|
SELECT id, name, description, weight, allowed_amounts FROM stat
|
|
WHERE scope_id = ?;
|
|
|
|
-- name: GetStat :one
|
|
SELECT id, name, description, weight, allowed_amounts FROM stat
|
|
WHERE scope_id = ? AND id = ?;
|
|
|
|
-- name: InsertStat :execresult
|
|
INSERT INTO stat (scope_id, name, description, weight, allowed_amounts)
|
|
VALUES (?, ?, ?, ?, ?);
|
|
|
|
-- name: UpdateStat :exec
|
|
UPDATE stat SET
|
|
name = ?,
|
|
description = ?,
|
|
weight = ?,
|
|
allowed_amounts = ?
|
|
WHERE id = ? AND scope_id = ?;
|
|
|
|
-- name: DeleteStat :exec
|
|
DELETE FROM stat WHERE id = ? AND scope_id = ?;
|