-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
style: remove commented out code in FindOptionsUtils #11721
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
style: remove commented out code in FindOptionsUtils #11721
Conversation
WalkthroughRemoved two public static helper methods from FindOptionsUtils that applied FindOptions to a query builder, leaving only the tree-specific applyOptionsToTreeQueryBuilder as public. This eliminates the generic options-driven application paths for standard query builders in this file. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
participant Caller
participant FindOptionsUtils
participant QueryBuilder
rect rgb(240,248,255)
Note over Caller,FindOptionsUtils: Previous flow (removed)
Caller->>FindOptionsUtils: applyOptionsToQueryBuilder(options)
FindOptionsUtils->>QueryBuilder: configure(select/relations/where/order/skip/take/locks/cache/...)
FindOptionsUtils-->>Caller: qb
end
rect rgb(245,255,245)
Note over Caller,FindOptionsUtils: Current flow
alt Tree queries
Caller->>FindOptionsUtils: applyOptionsToTreeQueryBuilder(treeOptions)
FindOptionsUtils->>QueryBuilder: configure(tree-specific)
FindOptionsUtils-->>Caller: qb
else Non-tree queries
Note over Caller,QueryBuilder: Caller handles configuration directly (no generic options helper)
end
end
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related issues
Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
💤 Files with no reviewable changes (1)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
gioboa
left a comment
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.
Thanks for your help, nice catch @DeeprajPandey 💪
commit: |
mguida22
left a comment
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.
thank you!
Closes #11158
Description of change
Removed commented out code block in
FindOptionsUtils.ts(lines 82+).The
applyFindManyOptionsOrConditionsToQueryBuilderfunction has been commented out with no indication of whether it's deprecated or temporarily disabled. Since it's not being used and has been in this state for a while, this PR removes it to clean up the codebase.Pull-Request Checklist
masterbranchFixes #00000Summary by CodeRabbit