Loggest thine Stuff
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.
 
 
 
 
 
 

26 lines
712 B

-- name: GetStat :one
SELECT * FROM stat WHERE id = ? AND scope_id = ?;
-- name: ListStats :many
SELECT * FROM stat WHERE scope_id = ? ORDER BY name;
-- 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 = ?;
-- name: DeleteAllItemStatProgressByStatId :exec
DELETE FROM item_stat_progress WHERE stat_id = ?;
-- name: DeleteAllProjectRequirementStatByStatId :exec
DELETE FROM project_requirement_stat WHERE stat_id = ?;