fix: support substring search on workspace name (#2096)

This commit is contained in:
Garrett Delfosse
2022-06-06 14:43:16 -05:00
committed by GitHub
parent 66cf59bbe1
commit a860b86256
4 changed files with 41 additions and 5 deletions

View File

@ -28,10 +28,10 @@ WHERE
owner_id = @owner_id
ELSE true
END
-- Filter by name
-- Filter by name, matching on substring
AND CASE
WHEN @name :: text != '' THEN
LOWER(name) = LOWER(@name)
LOWER(name) LIKE '%' || LOWER(@name) || '%'
ELSE true
END
;