pub trait ConnectionGatWorkaround<'conn, 'query, DB: Backend, B = DefaultLoadingMode> {
    type Cursor: Iterator<Item = QueryResult<Self::Row>>;
    type Row: Row<'conn, DB>;
}
Available on crate feature i-implement-a-third-party-backend-and-opt-into-breaking-changes only.
Expand description

This trait describes which cursor type is used by a given connection implementation. This trait is only useful in combination with Connection.

Implementation wise this is a workaround for GAT’s

Required Associated Types§

source

type Cursor: Iterator<Item = QueryResult<Self::Row>>

The cursor type returned by LoadConnection::load

Users should handle this as opaque type that implements Iterator

source

type Row: Row<'conn, DB>

The row type used as Iterator::Item for the iterator implementation of ConnectionGatWorkaround::Cursor

Implementors§

source§

impl<'conn, 'query> ConnectionGatWorkaround<'conn, 'query, Mysql, DefaultLoadingMode> for MysqlConnection

Available on crate features mysql and mysql_backend only.
§

type Cursor = StatementIterator<'conn>

§

type Row = MysqlRow

source§

impl<'conn, 'query> ConnectionGatWorkaround<'conn, 'query, Pg, PgRowByRowLoadingMode> for PgConnection

Available on crate features postgres and postgres_backend only.
§

type Cursor = RowByRowCursor<'conn>

§

type Row = PgRow

source§

impl<'conn, 'query> ConnectionGatWorkaround<'conn, 'query, Pg, DefaultLoadingMode> for PgConnection

Available on crate features postgres and postgres_backend only.
§

type Cursor = Cursor

§

type Row = PgRow

source§

impl<'conn, 'query> ConnectionGatWorkaround<'conn, 'query, Sqlite, DefaultLoadingMode> for SqliteConnection

Available on crate feature sqlite only.
§

type Cursor = StatementIterator<'conn, 'query>

§

type Row = SqliteRow<'conn, 'query>

source§

impl<'conn, 'query, DB, M, B> ConnectionGatWorkaround<'conn, 'query, DB, B> for PooledConnection<M>where M: ManageConnection, M::Connection: Connection<Backend = DB> + ConnectionGatWorkaround<'conn, 'query, DB, B>, DB: Backend,

Available on crate feature r2d2 only.
§

type Cursor = <<M as ManageConnection>::Connection as ConnectionGatWorkaround<'conn, 'query, DB, B>>::Cursor

§

type Row = <<M as ManageConnection>::Connection as ConnectionGatWorkaround<'conn, 'query, DB, B>>::Row