pub trait UpdateRecord: Sized + CandidType {
type Record: TableRecord;
type Schema: TableSchema<Record = Self::Record>;
// Required methods
fn from_values(
values: &[(ColumnDef, Value)],
where_clause: Option<Filter>,
) -> Self;
fn update_values(&self) -> Vec<(ColumnDef, Value)>;
fn where_clause(&self) -> Option<Filter>;
}Expand description
This trait represents a record for updating a table.
Required Associated Types§
Sourcetype Record: TableRecord
type Record: TableRecord
The TableRecord type associated with this table schema.
Sourcetype Schema: TableSchema<Record = Self::Record>
type Schema: TableSchema<Record = Self::Record>
The table schema associated with this record.
Required Methods§
Sourcefn update_values(&self) -> Vec<(ColumnDef, Value)>
fn update_values(&self) -> Vec<(ColumnDef, Value)>
Get the list of column Values to be updated.
Sourcefn where_clause(&self) -> Option<Filter>
fn where_clause(&self) -> Option<Filter>
Get the Filter condition for the update operation.
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.