-
Notifications
You must be signed in to change notification settings - Fork 41
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
GO-2973 Add FilterIn #1357
GO-2973 Add FilterIn #1357
Conversation
WalkthroughThe recent updates enhance the Changes
Sequence Diagram(s)sequenceDiagram
participant Tester
participant Queries
participant Database
Tester->>Queries: TestGetSpaceIDFromFilters
Queries->>Database: Database query with FilterIn type
Database-->>Queries: Returns filter data
Queries-->>Tester: Returns spaceID from filter data
Poem
Tip Early access features: enabledWe are currently testing the following features in early access:
Note:
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
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.
Actionable comments posted: 0
Outside diff range and nitpick comments (1)
pkg/lib/localstore/objectstore/queries.go (1)
Line range hint
39-39
: Specify keys in theFilterAllIn
struct literal.The
FilterAllIn
struct literal uses unkeyed fields, which can lead to maintenance issues.- optionFilter := database.FilterAllIn{relationKey, listValue.GetListValue()} + optionFilter := database.FilterAllIn{Key: relationKey, Value: listValue.GetListValue()}
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (2)
- pkg/lib/localstore/objectstore/queries.go (1 hunks)
- pkg/lib/localstore/objectstore/queries_test.go (1 hunks)
Additional context used
golangci-lint
pkg/lib/localstore/objectstore/queries.go
[error] 39-39: composites: github.com/anyproto/anytype-heart/pkg/lib/database.FilterAllIn struct literal uses unkeyed fields
(govet)
Additional comments not posted (2)
pkg/lib/localstore/objectstore/queries.go (1)
405-411
: LGTM!The addition of the
FilterIn
case to handlebundle.RelationKeySpaceId.String()
is logical and correct.pkg/lib/localstore/objectstore/queries_test.go (1)
1096-1105
: LGTM!The addition of the test case for
FilterIn
to verify the correct extraction ofspaceId
is logical and correct.
Coverage provided by https://github.com/seriousben/go-patch-cover-action |
Description
What type of PR is this? (check all applicable)
Related Tickets & Documents
Mobile & Desktop Screenshots/Recordings
Added tests?
Added to documentation?
[optional] Are there any post-deployment tasks we need to perform?