Skip to main content

SelectExt

Trait SelectExt 

Source
pub trait SelectExt<Out, Loads> {
    // Required methods
    fn all<'e, E>(self, ex: &'e E) -> BoxFuture<'e, Result<Vec<Out>, Error>>
       where E: Executor + Send + Sync + 'e,
             Loads: RunLoads<Out> + Send + Sync + 'e,
             Out: for<'r> FromRow<'r, PgRow> + Send + Unpin + 'e;
    fn one<'e, E>(self, ex: &'e E) -> BoxFuture<'e, Result<Option<Out>, Error>>
       where E: Executor + Send + Sync + 'e,
             Loads: RunLoads<Out> + Send + Sync + 'e,
             Out: for<'r> FromRow<'r, PgRow> + Send + Unpin + 'e;
    fn count<'e, E>(&self, ex: &'e E) -> BoxFuture<'e, Result<i64, Error>>
       where E: Executor + Send + Sync + 'e;
    fn exists<'e, E>(&self, ex: &'e E) -> BoxFuture<'e, Result<bool, Error>>
       where E: Executor + Send + Sync + 'e;
    fn paginate<'e, E>(
        self,
        page: u64,
        per_page: u64,
        ex: &'e E,
    ) -> BoxFuture<'e, Result<Page<Out>, Error>>
       where E: Executor + Send + Sync + 'e,
             Loads: RunLoads<Out> + Send + Sync + 'e,
             Out: for<'r> FromRow<'r, PgRow> + Send + Unpin + 'e;
}

Required Methods§

Source

fn all<'e, E>(self, ex: &'e E) -> BoxFuture<'e, Result<Vec<Out>, Error>>
where E: Executor + Send + Sync + 'e, Loads: RunLoads<Out> + Send + Sync + 'e, Out: for<'r> FromRow<'r, PgRow> + Send + Unpin + 'e,

Source

fn one<'e, E>(self, ex: &'e E) -> BoxFuture<'e, Result<Option<Out>, Error>>
where E: Executor + Send + Sync + 'e, Loads: RunLoads<Out> + Send + Sync + 'e, Out: for<'r> FromRow<'r, PgRow> + Send + Unpin + 'e,

Source

fn count<'e, E>(&self, ex: &'e E) -> BoxFuture<'e, Result<i64, Error>>
where E: Executor + Send + Sync + 'e,

Source

fn exists<'e, E>(&self, ex: &'e E) -> BoxFuture<'e, Result<bool, Error>>
where E: Executor + Send + Sync + 'e,

Source

fn paginate<'e, E>( self, page: u64, per_page: u64, ex: &'e E, ) -> BoxFuture<'e, Result<Page<Out>, Error>>
where E: Executor + Send + Sync + 'e, Loads: RunLoads<Out> + Send + Sync + 'e, Out: for<'r> FromRow<'r, PgRow> + Send + Unpin + 'e,

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§

Source§

impl<Out, Loads, Lock, DistinctState, GroupState> SelectExt<Out, Loads> for Select<Out, Loads, Lock, DistinctState, GroupState>
where Loads: JoinedFlag, Ops<<Loads as JoinedFlag>::Flag, Out, Loads>: JoinOps<Out = Out, Loads = Loads>, Lock: Send + 'static, DistinctState: Send + 'static, GroupState: Send + 'static,