Enum Mutation
pub enum Mutation {
Add {
table: String,
row: Vec<OwnedValue>,
},
Remove {
table: String,
row: Vec<OwnedValue>,
},
Edit {
table: String,
old: Vec<OwnedValue>,
new: Vec<OwnedValue>,
},
Truncate {
table: String,
},
Upsert {
table: String,
row: Vec<OwnedValue>,
},
}Expand description
One positional mutation (cells aligned to the table’s column order).
Variants§
Add
Remove
Edit
Truncate
Every row of table goes (a source TRUNCATE, design 406 §5.1). Applied as a plain
DELETE FROM, which the preupdate hook observes row by row (SQLite disables its truncate
optimization when a preupdate hook is registered), so IVM sees exact removes.
Upsert
Insert-or-update by key (design 406 §9): a backfill row copied at a snapshot. The present cells are written whether or not the row exists; absent cells keep their stored value on an existing row and are left NULL on a new one. The preupdate hook yields the exact add/edit to IVM, so no run-kind flag reaches the engine.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Mutation
impl RefUnwindSafe for Mutation
impl Send for Mutation
impl Sync for Mutation
impl Unpin for Mutation
impl UnsafeUnpin for Mutation
impl UnwindSafe for Mutation
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