Trait diesel::expression::SelectableHelper

source ·
pub trait SelectableHelper<DB: Backend>: Selectable<DB> + Sized {
    // Required method
    fn as_select() -> AsSelect<Self, DB>;

    // Provided method
    fn as_returning() -> AsSelect<Self, DB> { ... }
}
Expand description

This helper trait provides several methods for constructing a select or returning clause based on a Selectable implementation.

Required Methods§

source

fn as_select() -> AsSelect<Self, DB>

Construct a select clause based on a Selectable implementation.

The returned select clause enforces that you use the same type for constructing the select clause and for loading the query result into.

Provided Methods§

source

fn as_returning() -> AsSelect<Self, DB>

An alias for as_select that can be used with returning clauses

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<T, DB> SelectableHelper<DB> for T
where T: Selectable<DB>, DB: Backend,