Skip to content

Commit 7727f7c

Browse files
committed
fix: support substring search on workspace name
1 parent 367897e commit 7727f7c

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

coderd/database/queries.sql.go

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

coderd/database/queries/workspaces.sql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,10 @@ WHERE
2828
owner_id = @owner_id
2929
ELSE true
3030
END
31-
-- Filter by name
31+
-- Filter by name, matching on substring
3232
AND CASE
3333
WHEN @name :: text != '' THEN
34-
LOWER(name) = LOWER(@name)
34+
LOWER(name) LIKE '%' || LOWER(@name) || '%'
3535
ELSE true
3636
END
3737
;

0 commit comments

Comments
 (0)