pub struct Upsert {
pub table: String,
pub key: String,
pub row: Row,
}Expand description
Version-gated upsert command.
version is compared against the existing row’s version column (if any).
The store writes only when the row is absent or the existing version is
strictly less than this value. That makes projectors idempotent: replaying
the same event sequence twice — or receiving the same event twice through
at-least-once delivery — converges to the same final state.
Fields§
§table: StringLogical table / collection name (e.g. "users_view").
key: StringPrimary key value (string-typed; backends serialize as needed).
row: RowFull row payload as a JSON object. Must include the primary key field
and a version field so the store can apply the version gate.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Upsert
impl RefUnwindSafe for Upsert
impl Send for Upsert
impl Sync for Upsert
impl Unpin for Upsert
impl UnsafeUnpin for Upsert
impl UnwindSafe for Upsert
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more