mirror of
https://github.com/abhinavxd/libredesk.git
synced 2025-10-23 05:11:57 +00:00
31 lines
341 B
SQL
31 lines
341 B
SQL
-- name: get-all-tags
|
|
select
|
|
id,
|
|
created_at,
|
|
updated_at,
|
|
name
|
|
from
|
|
tags;
|
|
|
|
-- name: insert-tag
|
|
INSERT into
|
|
tags (name)
|
|
values
|
|
($1)
|
|
RETURNING *;
|
|
|
|
-- name: delete-tag
|
|
DELETE from
|
|
tags
|
|
where
|
|
id = $1;
|
|
|
|
-- name: update-tag
|
|
UPDATE
|
|
tags
|
|
set
|
|
name = $2,
|
|
updated_at = now()
|
|
where
|
|
id = $1
|
|
RETURNING *; |