-
Notifications
You must be signed in to change notification settings - Fork 9
Database cleanup selects queries #105
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
Conversation
WalkthroughThe cleanup method in the Database adapter has been modified to simplify its delete query construction. The explicit selection of specific document fields ($sequence, $id, $collection, $permissions, $updatedAt, time) has been removed from the query builder. A comment block has been added noting a planned future transition to individual selected queries. The delete query now applies only time-based filtering and ordering without the prior field visibility logic. Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes 🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
📜 Recent review detailsConfiguration used: Organization UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
✏️ Tip: You can disable this entire section by setting 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 |
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
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
src/Audit/Adapter/Database.php (1)
387-395: Query::orderAsc() requires a field argument per the Query API.The documented API for
Query::orderAsc()expects an attribute parameter (e.g.,Query::orderAsc('time')). Line 394 callsQuery::orderAsc()without an argument, which is inconsistent with the documented behavior and differs from the ordered queries used elsewhere in the file (lines 154, 210, 271, 335).For the cleanup operation, either specify the field explicitly—
Query::orderAsc('time')—or remove this call if no secondary sort is intended.
📜 Review details
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
src/Audit/Adapter/Database.php
✏️ Tip: You can disable this entire section by setting review_details to false in your review settings.
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.