Trait diesel::connection::LoadConnection
source · pub trait LoadConnection<B = DefaultLoadingMode>: Connection {
type Cursor<'conn, 'query>: Iterator<Item = QueryResult<<Self as LoadConnection<B>>::Row<'conn, 'query>>>
where Self: 'conn;
type Row<'conn, 'query>: Row<'conn, Self::Backend>
where Self: 'conn;
}
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 parameter.
Required Associated Types§
sourcetype Cursor<'conn, 'query>: Iterator<Item = QueryResult<<Self as LoadConnection<B>>::Row<'conn, 'query>>>
where
Self: 'conn
type Cursor<'conn, 'query>: Iterator<Item = QueryResult<<Self as LoadConnection<B>>::Row<'conn, 'query>>> where Self: 'conn
The cursor type returned by LoadConnection::load
Users should handle this as opaque type that implements Iterator
sourcetype Row<'conn, 'query>: Row<'conn, Self::Backend>
where
Self: 'conn
type Row<'conn, 'query>: Row<'conn, Self::Backend> where Self: 'conn
The row type used as Iterator::Item
for the iterator implementation
of LoadConnection::Cursor
Implementors§
source§impl LoadConnection<DefaultLoadingMode> for MysqlConnection
Available on crate features mysql
and mysql_backend
only.
impl LoadConnection<DefaultLoadingMode> for MysqlConnection
Available on crate features
mysql
and mysql_backend
only.source§impl LoadConnection<DefaultLoadingMode> for SqliteConnection
Available on crate feature sqlite
only.
impl LoadConnection<DefaultLoadingMode> for SqliteConnection
Available on crate feature
sqlite
only.source§impl<B> LoadConnection<B> for PgConnectionwhere
Self: PgLoadingMode<B>,
Available on crate features postgres
and postgres_backend
only.
impl<B> LoadConnection<B> for PgConnectionwhere Self: PgLoadingMode<B>,
Available on crate features
postgres
and postgres_backend
only.type Cursor<'conn, 'query> = <PgConnection as PgLoadingMode<B>>::Cursor<'conn, 'query>
type Row<'conn, 'query> = <PgConnection as PgLoadingMode<B>>::Row<'conn, 'query>
source§impl<B, M> LoadConnection<B> for PooledConnection<M>where
M: ManageConnection,
M::Connection: LoadConnection<B> + R2D2Connection,
Available on crate feature r2d2
only.
impl<B, M> LoadConnection<B> for PooledConnection<M>where M: ManageConnection, M::Connection: LoadConnection<B> + R2D2Connection,
Available on crate feature
r2d2
only.