pub trait LoadConnection<B = DefaultLoadingMode>: Connectionwhere
    for<'conn, 'query> Self: ConnectionGatWorkaround<'conn, 'query, Self::Backend, B>,
{ fn load<'conn, 'query, T>(
        &'conn mut self,
        source: T
    ) -> QueryResult<LoadRowIter<'conn, 'query, Self, Self::Backend, B>>
        T: Query + QueryFragment<Self::Backend> + QueryId + 'query,
        Self::Backend: QueryMetadata<T::SqlType>
; }
Expand description

The specific part of a Connection which actually loads data from the database

This is a separate trait to allow connection implementations to specify different loading modes via the generic paramater.

Required Methods

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

Executes a given query and returns any requested values

This function executes a given query and returns the query result as given by the database. Normal users should not use this function. Use QueryDsl::load instead.

This function is useful for people trying to build an alternative dsl on top of diesel. It returns an LoadRowIter, which is essentially an Iterator<Item = QueryResult<&impl Row<Self::Backend>>. This type can be used to iterate over all rows returned by the database.