sql_support

Function each_chunk_mapped

source
pub fn each_chunk_mapped<'a, T, U, E, Mapper, DoChunk>(
    items: &'a [T],
    to_sql: Mapper,
    do_chunk: DoChunk,
) -> Result<(), E>
where T: 'a, U: ToSql + 'a, Mapper: Fn(&'a T) -> U, DoChunk: FnMut(Map<Iter<'a, T>, &Mapper>, usize) -> Result<(), E>,
Expand description

A version of each_chunk for the case when the conversion to to_sql requires an custom intermediate step. For example, you might want to grab a property off of an array of records