fn extract_column_char_max_len(index: usize, row: MySqlRow) -> Result<Option<i32>> {
    let character_maximum_length = match row.try_get(index) {
        Ok(c) => c,
        Err(_) => row.try_get::<Option<u64>, usize>(index)?.map(|c| c as i32),
    };

    Ok(character_maximum_length)
}
/// Extracts a column's max character length. MySql's datatype for max char length is INT, but for
/// Mariadb it's BIGINT UNSIGNED, so we must try both rust data types when reading the row. We
/// truncate i64 to i32 in order to fit our internal models and practically, we probably won't be
/// generating synthetic data for sizes beyond i32.
Extracts a column's max character length. MySql's datatype for max char length is INT, but for
Mariadb it's BIGINT UNSIGNED, so we must try both rust data types when reading the row. We
truncate i64 to i32 in order to fit our internal models and practically, we probably won't be
generating synthetic data for sizes beyond i32.
Extracts a column ' s max character length . MySql ' s datatype for max char length is INT but for Mariadb it ' s BIGINT UNSIGNED so we must try both rust data types when reading the row . We truncate i64 to i32 in order to fit our internal models and practically we probably won ' t be generating synthetic data for sizes beyond i32 .
fn extract_column_char_max_len(index: usize, row: MySqlRow) -> Result<Option<i32>> {
    let character_maximum_length = match row.try_get(index) {
        Ok(c) => c,
        Err(_) => row.try_get::<Option<u64>, usize>(index)?.map(|c| c as i32),
    };
    Ok(character_maximum_length)
}
fn extract_column_char_max_len ( index : usize , row : MySqlRow ) -> Result < Option < i32 > > { let character_maximum_length = match row . try_get ( index ) { Ok ( c ) => c , Err ( _ ) => row . try_get :: < Option < u64 > , usize > ( index ) ? . map ( | c | c as i32 ) , } ; Ok ( character_maximum_length ) }
Extracts a column's max character length.
Extracts a column ' s max character length .
index
usize
row
MySqlRow
index
usize
row
MySqlRow