Skip to main content

prepare_row_edits

Function prepare_row_edits 

Source
fn prepare_row_edits(
    edits: &[RowEdit],
    fields: &[Field],
    new_row: Vec<DecodedData>,
    row_count: usize,
    copied: &BTreeMap<usize, Vec<(usize, DecodedData)>>,
) -> Result<Vec<PreparedEdit>, ApiError>
Expand description

Converts row edits to the types of their columns, and checks their indexes against the rows the table will have when each one is applied.

ยงArguments

  • edits - The edits to prepare.
  • fields - Columns of the table, as rows see them.
  • new_row - A row with the default value of each column.
  • row_count - Amount of rows of the table before the edits.
  • copied - Values of the rows the inserts copy, by edit index and column index.