Skip to main content

SQLModel

Trait SQLModel 

Source
pub trait SQLModel<'a, V: SQLParam>: ToSQL<'a, V> {
    // Required methods
    fn columns(&self) -> Cow<'static, [ColumnRef]>;
    fn values(&self) -> SQL<'a, V>;
}
Expand description

A table’s select, insert, update or partial model, generated by the table macros.

Required Methods§

Source

fn columns(&self) -> Cow<'static, [ColumnRef]>

The columns this model sets or reads, in order.

Models with a fixed column list return a borrowed slice; others may allocate.

Source

fn values(&self) -> SQL<'a, V>

The model’s values, comma-separated, in the order of columns.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§