chore: add organization search query to workspaces (#14474)

* chore: add organization search query to workspaces
This commit is contained in:
Steven Masley
2024-08-28 15:18:45 -05:00
committed by GitHub
parent 54fe082551
commit b96ac677f1
7 changed files with 109 additions and 78 deletions

View File

@ -195,6 +195,12 @@ WHERE
workspaces.owner_id = @owner_id
ELSE true
END
-- Filter by organization_id
AND CASE
WHEN @organization_id :: uuid != '00000000-0000-0000-0000-000000000000'::uuid THEN
workspaces.organization_id = @organization_id
ELSE true
END
-- Filter by build parameter
-- @has_param will match any build that includes the parameter.
AND CASE WHEN array_length(@has_param :: text[], 1) > 0 THEN