pub trait StreamTrait: Send + Sync {
    type Stream<'a>: Stream<Item = Result<QueryResult, DbErr>> + Send
    where
        Self: 'a
; fn stream<'a>(
        &'a self,
        stmt: Statement
    ) -> Pin<Box<dyn Future<Output = Result<Self::Stream<'a>, DbErr>> + Send + 'a>>; }
Expand description

Stream query results

Required Associated Types§

source

type Stream<'a>: Stream<Item = Result<QueryResult, DbErr>> + Send
where
    Self: 'a

Create a stream for the QueryResult

Required Methods§

source

fn stream<'a>(
    &'a self,
    stmt: Statement
) -> Pin<Box<dyn Future<Output = Result<Self::Stream<'a>, DbErr>> + Send + 'a>>

Execute a Statement and return a stream of results

Implementors§