UpdateRecord

Trait UpdateRecord 

Source
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§

Source

type Record: TableRecord

The TableRecord type associated with this table schema.

Source

type Schema: TableSchema<Record = Self::Record>

The table schema associated with this record.

Required Methods§

Source

fn from_values( values: &[(ColumnDef, Value)], where_clause: Option<Filter>, ) -> Self

Creates an update record from a list of column Values and an optional Filter for the where clause.

Source

fn update_values(&self) -> Vec<(ColumnDef, Value)>

Get the list of column Values to be updated.

Source

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.

Implementors§