Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Determine if G2_searchByAttributesV3() can be used #205

Closed
docktermj opened this issue May 31, 2024 · 2 comments
Closed

Determine if G2_searchByAttributesV3() can be used #205

docktermj opened this issue May 31, 2024 · 2 comments
Assignees
Labels
V4 To be delivered in V4

Comments

@docktermj
Copy link
Contributor

In

if len(searchProfile) > 0 {
result, err = client.searchByAttributesV3(ctx, attributes, searchProfile, flags)
} else {
result, err = client.searchByAttributesV2(ctx, attributes, flags)
}

Determine if the call to searchByAttributesV2 can be replaced by searchByAttributesV3, thus removing the if/else contition

@docktermj docktermj self-assigned this May 31, 2024
@docktermj docktermj added the V4 To be delivered in V4 label May 31, 2024
@github-actions github-actions bot added the triage Need to triage label May 31, 2024
@docktermj docktermj removed the triage Need to triage label May 31, 2024
@docktermj
Copy link
Contributor Author

In researching, a call to searchByAttributesV3 with a zero length searchProfile behaves the same as searchByAttributesV2, so

if len(searchProfile) > 0 {
result, err = client.searchByAttributesV3(ctx, attributes, searchProfile, flags)
} else {
result, err = client.searchByAttributesV2(ctx, attributes, flags)
}

can be simplified to

 	result, err = client.searchByAttributesV3(ctx, attributes, searchProfile, flags) 

@docktermj
Copy link
Contributor Author

Fixed via #232

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
V4 To be delivered in V4
Projects
None yet
Development

No branches or pull requests

1 participant