-
Notifications
You must be signed in to change notification settings - Fork 166
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
refactor(torii): include model in entity deletion for filter & update member broadcast #2299
Conversation
…ast model member update
WalkthroughOhayo, sensei! The recent changes significantly enhance the SQL handling and data structures for entity management. Key updates include the addition of an Changes
Sequence Diagram(s)sequenceDiagram
participant Client
participant Service
participant Database
Client->>Service: Request to insert entity
Service->>Database: Execute insert query with executed_at
alt conflict
Database-->>Service: Return updated entity
end
Service-->>Client: Respond with entity details
Client->>Service: Request to update entity
Service->>Database: Execute update query for entity
Database-->>Service: Return updated entity
Service-->>Client: Respond with updated entity details
Client->>Service: Request to delete entity
Service->>Database: Execute delete operation
Database-->>Service: Return deletion status
Service-->>Client: Acknowledge deletion
Recent review detailsConfiguration used: .coderabbit.yaml Files selected for processing (1)
Files skipped from review as they are similar to previous changes (1)
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 Configuration 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, codebase verification and nitpick comments (1)
crates/torii/core/src/types.rs (1)
41-45
: Add a comment for thedeleted
field.The
deleted
field in theEntity
struct is a significant addition. Consider adding a comment to explain its purpose and usage, similar to the comment forupdated_model
.+ // indicates if the entity has been marked as deleted
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2299 +/- ##
==========================================
- Coverage 69.60% 69.58% -0.03%
==========================================
Files 352 352
Lines 46031 46047 +16
==========================================
Hits 32040 32040
- Misses 13991 14007 +16 ☔ View full report in Codecov by Sentry. |
We now include the model within the Entity struct to be used with clauses on subscriptions to also receive entity deletions and now broadcast update member to subscriptions
Summary by CodeRabbit
New Features
Bug Fixes
Documentation