feat(issues): add structured ticket search
This commit is contained in:
parent
efe131591f
commit
34c39b765e
11 changed files with 1033 additions and 27 deletions
|
|
@ -7,6 +7,14 @@ WHERE workspace_id = $1
|
|||
ORDER BY position ASC, created_at DESC
|
||||
LIMIT $2 OFFSET $3;
|
||||
|
||||
-- name: ListAllIssues :many
|
||||
SELECT * FROM issue
|
||||
WHERE workspace_id = $1
|
||||
AND (sqlc.narg('status')::text IS NULL OR status = sqlc.narg('status'))
|
||||
AND (sqlc.narg('priority')::text IS NULL OR priority = sqlc.narg('priority'))
|
||||
AND (sqlc.narg('assignee_id')::uuid IS NULL OR assignee_id = sqlc.narg('assignee_id'))
|
||||
ORDER BY position ASC, created_at DESC;
|
||||
|
||||
-- name: GetIssue :one
|
||||
SELECT * FROM issue
|
||||
WHERE id = $1;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue