Open Larkooo opened 5 days ago
Ohayo, sensei! This pull request introduces the OptimisticEntityUpdate
structure, which is integrated into the Sql
implementation and the Service
struct in the entity.rs
file. The new structure facilitates the handling of entity updates, allowing for a more optimistic concurrency model. Changes include the creation of instances of OptimisticEntityUpdate
in SQL methods and updates to the service's methods to accommodate this new type, enhancing the entity update mechanism across the codebase.
Files | Change Summary |
---|---|
crates/torii/core/src/sql.rs |
Introduced OptimisticEntityUpdate structure; integrated into Sql methods, updating entity handling. |
crates/torii/core/src/types.rs |
Added public struct OptimisticEntityUpdate with fields for id , keys , event_id , updated_model , and deleted . |
crates/torii/grpc/src/server/subscriptions/entity.rs |
Updated Service struct to use OptimisticEntityUpdate instead of Entity in method signatures and broker initialization. |
Sql
implementation in sql.rs
related to entity insertion and updates, similar to the introduction of OptimisticEntityUpdate
.set_entity
function, aligning with the main PR's updates.Service
struct in entity.rs
to streamline entity update handling, directly related to the changes made in the main PR.
Summary by CodeRabbit
New Features
OptimisticEntityUpdate
, enhancing the mechanism for publishing updates related to entities.OptimisticEntityUpdate
, improving the handling of entity updates.Bug Fixes
Documentation
OptimisticEntityUpdate
structure and its fields.