LoadQuery

Trait LoadQuery 

Source
pub trait LoadQuery<'query, Conn, U, B = DefaultLoadingMode>: RunQueryDsl<Conn> {
    type RowIter<'conn>: Iterator<Item = QueryResult<U>>
       where Conn: 'conn;

    // Required method
    fn internal_load(self, conn: &mut Conn) -> QueryResult<Self::RowIter<'_>>;
}
Expand description

The load method

This trait should not be relied on directly by most apps. Its behavior is provided by RunQueryDsl. However, you may need a where clause on this trait to call load from generic code.

Required Associated Types§

Source

type RowIter<'conn>: Iterator<Item = QueryResult<U>> where Conn: 'conn

Return type of LoadQuery::internal_load

Required Methods§

Source

fn internal_load(self, conn: &mut Conn) -> QueryResult<Self::RowIter<'_>>

Available on crate feature i-implement-a-third-party-backend-and-opt-into-breaking-changes only.

Load this query

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.

Implementations on Foreign Types§

Source§

impl<'query, V, T, QId, Op, U, B, Target, ConflictOpt, const STATIC_QUERY_ID: bool> LoadQuery<'query, SqliteConnection, U, B> for (No, InsertStatement<T, OnConflictValues<BatchInsert<V, T, QId, STATIC_QUERY_ID>, Target, ConflictOpt>, Op>)
where T: Table + QueryId + 'static, InsertStatement<T, OnConflictValues<SqliteBatchInsertWrapper<V, T, QId, STATIC_QUERY_ID>, Target, ConflictOpt>, Op>: LoadQuery<'query, SqliteConnection, U, B>, Self: RunQueryDsl<SqliteConnection>,

Available on crate feature sqlite only.
Source§

type RowIter<'conn> = <InsertStatement<T, OnConflictValues<SqliteBatchInsertWrapper<V, T, QId, STATIC_QUERY_ID>, Target, ConflictOpt>, Op> as LoadQuery<'query, SqliteConnection, U, B>>::RowIter<'conn>

Source§

fn internal_load( self, conn: &mut SqliteConnection, ) -> QueryResult<Self::RowIter<'_>>

Available on crate feature i-implement-a-third-party-backend-and-opt-into-breaking-changes only.
Source§

impl<'query, V, T, QId, Op, U, B, Target, ConflictOpt, const STATIC_QUERY_ID: bool> LoadQuery<'query, SqliteConnection, U, B> for (Yes, InsertStatement<T, OnConflictValues<BatchInsert<Vec<ValuesClause<V, T>>, T, QId, STATIC_QUERY_ID>, Target, ConflictOpt>, Op>)
where T: Table + Copy + QueryId + 'static, T::FromClause: Copy, Op: Copy, Target: Copy, ConflictOpt: Copy, InsertStatement<T, OnConflictValues<ValuesClause<V, T>, Target, ConflictOpt>, Op>: LoadQuery<'query, SqliteConnection, U, B>, Self: RunQueryDsl<SqliteConnection>,

Available on crate feature sqlite only.
Source§

type RowIter<'conn> = IntoIter<Result<U, Error>>

Source§

fn internal_load( self, conn: &mut SqliteConnection, ) -> QueryResult<Self::RowIter<'_>>

Available on crate feature i-implement-a-third-party-backend-and-opt-into-breaking-changes only.
Source§

impl<'query, V, T, QId, Op, U, B, const STATIC_QUERY_ID: bool> LoadQuery<'query, SqliteConnection, U, B> for (No, InsertStatement<T, BatchInsert<V, T, QId, STATIC_QUERY_ID>, Op>)
where T: Table + QueryId + 'static, InsertStatement<T, SqliteBatchInsertWrapper<V, T, QId, STATIC_QUERY_ID>, Op>: LoadQuery<'query, SqliteConnection, U, B>, Self: RunQueryDsl<SqliteConnection>,

Available on crate feature sqlite only.
Source§

type RowIter<'conn> = <InsertStatement<T, SqliteBatchInsertWrapper<V, T, QId, STATIC_QUERY_ID>, Op> as LoadQuery<'query, SqliteConnection, U, B>>::RowIter<'conn>

Source§

fn internal_load( self, conn: &mut SqliteConnection, ) -> QueryResult<Self::RowIter<'_>>

Available on crate feature i-implement-a-third-party-backend-and-opt-into-breaking-changes only.
Source§

impl<'query, V, T, QId, Op, U, B, const STATIC_QUERY_ID: bool> LoadQuery<'query, SqliteConnection, U, B> for (Yes, InsertStatement<T, BatchInsert<Vec<ValuesClause<V, T>>, T, QId, STATIC_QUERY_ID>, Op>)
where T: Table + Copy + QueryId + 'static, Op: Copy + QueryId + QueryFragment<Sqlite>, InsertStatement<T, ValuesClause<V, T>, Op>: LoadQuery<'query, SqliteConnection, U, B>, Self: RunQueryDsl<SqliteConnection>,

Available on crate feature sqlite only.
Source§

type RowIter<'conn> = IntoIter<Result<U, Error>>

Source§

fn internal_load( self, conn: &mut SqliteConnection, ) -> QueryResult<Self::RowIter<'_>>

Available on crate feature i-implement-a-third-party-backend-and-opt-into-breaking-changes only.

Implementors§

Source§

impl<'query, Conn, T, U, DB, B> LoadQuery<'query, Conn, U, B> for T
where Conn: Connection<Backend = DB> + LoadConnection<B>, T: AsQuery + RunQueryDsl<Conn>, T::Query: QueryFragment<DB> + QueryId + 'query, T::SqlType: CompatibleType<U, DB>, DB: Backend + QueryMetadata<T::SqlType> + 'static, U: FromSqlRow<<T::SqlType as CompatibleType<U, DB>>::SqlType, DB> + 'static, <T::SqlType as CompatibleType<U, DB>>::SqlType: 'static,

Source§

type RowIter<'conn> = LoadIter<U, <Conn as LoadConnection<B>>::Cursor<'conn, 'query>, <<T as AsQuery>::SqlType as CompatibleType<U, DB>>::SqlType, DB> where Conn: 'conn

Source§

impl<'query, V, T, QId, Op, O, U, B, const STATIC_QUERY_ID: bool> LoadQuery<'query, SqliteConnection, U, B> for InsertStatement<T, BatchInsert<Vec<ValuesClause<V, T>>, T, QId, STATIC_QUERY_ID>, Op>
where T: QuerySource, V: ContainsDefaultableValue<Out = O>, O: Default, (O, Self): LoadQuery<'query, SqliteConnection, U, B>,

Available on crate feature sqlite only.
Source§

type RowIter<'conn> = <(O, InsertStatement<T, BatchInsert<Vec<ValuesClause<V, T>>, T, QId, STATIC_QUERY_ID>, Op>) as LoadQuery<'query, SqliteConnection, U, B>>::RowIter<'conn>