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

feature(datastore): adds in, not-in, and != query operators #6017

Merged
merged 24 commits into from Jun 16, 2022

Conversation

telpirion
Copy link
Contributor

This PR was previously merged and then reverted.

Waiting for feature to be launched.

@telpirion telpirion added the do not merge Indicates a pull request not ready for merge, due to either quality or timing. label May 9, 2022
@telpirion telpirion requested review from enocom and a team as code owners May 9, 2022 20:52
@product-auto-label product-auto-label bot added size: m Pull request size is medium. api: datastore Issues related to the Datastore API. labels May 9, 2022
@telpirion telpirion requested a review from kolea2 May 9, 2022 20:55
@telpirion
Copy link
Contributor Author

Per @kolea2 : Be sure to add integration tests

@product-auto-label product-auto-label bot added the stale: old Pull request is old and needs attention. label Jun 9, 2022
@telpirion telpirion removed the do not merge Indicates a pull request not ready for merge, due to either quality or timing. label Jun 14, 2022
@telpirion telpirion removed the stale: old Pull request is old and needs attention. label Jun 15, 2022
@telpirion
Copy link
Contributor Author

Logged #6184 to track enabling the integration tests for this feature.

@product-auto-label product-auto-label bot added the stale: old Pull request is old and needs attention. label Jun 16, 2022
@telpirion telpirion merged commit e926fb4 into main Jun 16, 2022
@telpirion telpirion deleted the datastore-query branch June 16, 2022 16:31
@telpirion telpirion removed the stale: old Pull request is old and needs attention. label Jun 17, 2022
@lixin9311
Copy link

Hi, thanks for releasing this feature.

Is it possible that we could change the signature of the FilterField(fieldName, operator string, value interface{}) into FilterField(fieldName, operator string, value ...interface{})?
So that we could make our code much clear if we want to use the IN query.

baseQuery.FilterField("I", "not-in", []interface{}{1, 3, 5, 7})

baseQuery.FilterField("I", "not-in", 1, 3, 5, 7)

As for equality queries, we can take the first element of the value, or panic if there is no given value.

@telpirion
Copy link
Contributor Author

Hi @lixin9311 ! Thank you for your message.

In the future, it's probably best to log an issue in the repo to ask for a feature request. That said, I don't think that I'll accept your requested change. I think that adding a variadic value to account for array values isn't going to be useful for most customers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: datastore Issues related to the Datastore API. size: m Pull request size is medium.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants