Skip to content

Commit

Permalink
fix: make SetResourceSelectorClause public
Browse files Browse the repository at this point in the history
it's being used in canary checker
  • Loading branch information
adityathebe committed Jan 8, 2025
1 parent 8a181f6 commit 770fd01
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions query/resource_selector.go
Original file line number Diff line number Diff line change
Expand Up @@ -152,8 +152,7 @@ func SearchResources(ctx context.Context, req SearchResourcesRequest) (*SearchRe
return &output, nil
}

func setResourceSelectorClause(ctx context.Context, resourceSelector types.ResourceSelector, query *gorm.DB, table string, allowedColumnsAsFields []string) (*gorm.DB, error) {

func SetResourceSelectorClause(ctx context.Context, resourceSelector types.ResourceSelector, query *gorm.DB, table string, allowedColumnsAsFields []string) (*gorm.DB, error) {
// We call setSearchQueryParams as it sets those params that
// might later be used by the query

Expand Down Expand Up @@ -397,7 +396,7 @@ func queryResourceSelector(ctx context.Context, limit int, resourceSelector type
query = query.Limit(limit)
}

query, err := setResourceSelectorClause(ctx, resourceSelector, query, table, allowedColumnsAsFields)
query, err := SetResourceSelectorClause(ctx, resourceSelector, query, table, allowedColumnsAsFields)
if err != nil {
return nil, err
}
Expand Down

0 comments on commit 770fd01

Please sign in to comment.