Loggest thy 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.

21 lines
579 B

3 years ago
  1. -- name: ListStats :many
  2. SELECT id, name, description, weight, allowed_amounts FROM stat
  3. WHERE scope_id = ?;
  4. -- name: GetStat :one
  5. SELECT id, name, description, weight, allowed_amounts FROM stat
  6. WHERE scope_id = ? AND id = ?;
  7. -- name: InsertStat :execresult
  8. INSERT INTO stat (scope_id, name, description, weight, allowed_amounts)
  9. VALUES (?, ?, ?, ?, ?);
  10. -- name: UpdateStat :exec
  11. UPDATE stat SET
  12. name = ?,
  13. description = ?,
  14. weight = ?,
  15. allowed_amounts = ?
  16. WHERE id = ? AND scope_id = ?;
  17. -- name: DeleteStat :exec
  18. DELETE FROM stat WHERE id = ? AND scope_id = ?;