Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

chore: add organization search query to workspaces#14474

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
Emyrk merged 2 commits intomainfromstevenmasley/workspace_org_search
Aug 28, 2024

Conversation

Emyrk
Copy link
Member

Closes#14444

@@ -95,7 +75,7 @@ func Users(query string) (database.GetUsersParams, []codersdk.ValidationError) {
return filter, parser.Errors
}

func Workspaces(query string, page codersdk.Pagination, agentInactiveDisconnectTimeout time.Duration) (database.GetWorkspacesParams, []codersdk.ValidationError) {
func Workspaces(ctx context.Context, db database.Store,query string, page codersdk.Pagination, agentInactiveDisconnectTimeout time.Duration) (database.GetWorkspacesParams, []codersdk.ValidationError) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

aside: I see why we do it in this package, but this is kind of a weird naming scheme for something that returns database query params.

Copy link
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Fair. Maybe it should be namedWorkspacesFilter or something. I won't address here though

Comment on lines +273 to +277
db := dbmem.New()
if c.Setup != nil {
c.Setup(t, db)
}
values, errs := searchquery.Workspaces(context.Background(), db, c.Query, codersdk.Pagination{}, 0)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Can we not use the traditional way of getting a DB in tests so this can run against postgres too?

Copy link
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

I'd prefer not to for this. What would be even better is if I used the mock database, but I haven't messed with that at all yet.

@EmyrkEmyrk merged commitb96ac67 intomainAug 28, 2024
27 checks passed
@EmyrkEmyrk deleted the stevenmasley/workspace_org_search branchAugust 28, 2024 20:18
@github-actionsgithub-actionsbot locked and limited conversation to collaboratorsAug 28, 2024
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.
Reviewers

@f0sself0sself0ssel approved these changes

Assignees

@EmyrkEmyrk

Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

Addorganizations to workspace search query
2 participants
@Emyrk@f0ssel

[8]ページ先頭

©2009-2025 Movatter.jp