pub trait UpdateVTab<'vtab>: VTab<'vtab> {
// Required method
fn update(&'vtab self, info: &mut ChangeInfo) -> Result<i64>;
}Expand description
A virtual table that supports INSERT/UPDATE/DELETE.
Required Methods§
Sourcefn update(&'vtab self, info: &mut ChangeInfo) -> Result<i64>
fn update(&'vtab self, info: &mut ChangeInfo) -> Result<i64>
Modify a single row in the virtual table. The info parameter may be used to determine the type of change being performed by this update.
If the change is an INSERT for a table with rowids and the provided rowid was NULL, then the virtual table must generate and return a rowid for the inserted row. In all other cases, the returned Ok value of this method is ignored.
It isn’t possible to provide a mutable reference to the virtual table implementation because there may be active cursors affecting the table or even the row that is being updated. Use Rust’s interior mutability types to properly implement this method.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.