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
feat(datastore): adds in, not-in, and != query operations #5975
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall LGTM, a couple minor ideas/suggestions.
Co-authored-by: Tyler Bui-Palsulich <26876514+tbpg@users.noreply.github.com>
Co-authored-by: Tyler Bui-Palsulich <26876514+tbpg@users.noreply.github.com>
// Fields are compared against the provided value using the operator. | ||
// Multiple filters are AND'ed together. | ||
// Field names which contain spaces, quote marks, or operator characters | ||
// should be passed as quoted Go string literals as returned by strconv.Quote | ||
// or the fmt package's %q verb. | ||
func (q *Query) Filter(filterStr string, value interface{}) *Query { | ||
q = q.clone() | ||
// TODO( #5977 ): Add better string parsing (or something) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we need this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The comment? The TrimRight()
technique of parsing the input filterStr
seems like it could introduce unwanted side effects.
)" This reverts commit db9991f.
BEGIN_COMMIT_OVERRIDE
chore: adds in, not-in, and != query operations
END_COMMIT_OVERRIDE