Skip to main content

rows

Function rows 

Source
pub fn rows<C, R>(
    names: Vec<String>,
    rows: Vec<Vec<Value>>,
    column: impl Fn(String, usize, TypeInfo) -> C,
    row: impl Fn(Arc<[C]>, Box<[Value]>) -> R,
) -> Result<Vec<R>, Error>
Expand description

The rows of one result, from its column names and its rows of values.

Each column is typed by its first non-NULL value, since neither backend reports declared types; column builds a driver’s column from its name, ordinal and that type, and every row shares the one column list. row builds a driver’s row from the columns and its values.

§Errors

When a row does not have one value per column.