Skip to main content

TableRecord

Trait TableRecord 

Source
pub trait TableRecord: Clone {
    type Schema: TableSchema<Record = Self>;

    // Required methods
    fn from_values(values: Vec<(ValuesSource, Vec<(ColumnDef, Value)>)>) -> Self;
    fn to_values(&self) -> Vec<(ColumnDef, Value)>;
}
Expand description

This trait represents a record returned by a crate::dbms::query::Query for a table.

Required Associated Types§

Source

type Schema: TableSchema<Record = Self>

The table schema associated with this record.

Required Methods§

Source

fn from_values(values: Vec<(ValuesSource, Vec<(ColumnDef, Value)>)>) -> Self

Constructs TableRecord from a list of column values grouped by table.

Source

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

Converts the record into a list of column Values.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§