chore: allow search by build params in workspace search filter (#12694)

* chore: workspace search filter allow search by params
* has_param will return all workspaces with the param existance
* exact matching
This commit is contained in:
Steven Masley
2024-03-22 14:22:47 -05:00
committed by GitHub
parent b4fd819f0d
commit c674128105
10 changed files with 485 additions and 47 deletions

View File

@ -213,9 +213,12 @@ func (q *sqlQuerier) GetAuthorizedWorkspaces(ctx context.Context, arg GetWorkspa
// The name comment is for metric tracking
query := fmt.Sprintf("-- name: GetAuthorizedWorkspaces :many\n%s", filtered)
rows, err := q.db.QueryContext(ctx, query,
pq.Array(arg.ParamNames),
pq.Array(arg.ParamValues),
arg.Deleted,
arg.Status,
arg.OwnerID,
pq.Array(arg.HasParam),
arg.OwnerUsername,
arg.TemplateName,
pq.Array(arg.TemplateIDs),