taskcafe/internal/db/query/task_label.sql

19 lines
636 B
MySQL
Raw Permalink Normal View History

2020-04-20 05:02:55 +02:00
-- name: CreateTaskLabelForTask :one
2020-04-21 01:04:27 +02:00
INSERT INTO task_label (task_id, project_label_id, assigned_date)
2020-04-20 05:02:55 +02:00
VALUES ($1, $2, $3) RETURNING *;
-- name: GetTaskLabelsForTaskID :many
SELECT * FROM task_label WHERE task_id = $1;
2020-05-31 06:11:19 +02:00
-- name: GetTaskLabelByID :one
SELECT * FROM task_label WHERE task_label_id = $1;
-- name: DeleteTaskLabelByID :exec
DELETE FROM task_label WHERE task_label_id = $1;
-- name: GetTaskLabelForTaskByProjectLabelID :one
SELECT * FROM task_label WHERE task_id = $1 AND project_label_id = $2;
-- name: DeleteTaskLabelForTaskByProjectLabelID :exec
DELETE FROM task_label WHERE project_label_id = $2 AND task_id = $1;