pub trait InputParameterMapping {
// Required methods
fn parameter_index_to_column_index(&self, paramteter_index: u16) -> usize;
fn num_parameters(&self) -> usize;
}
Expand description
Governs how indices of bound buffers map to the indices of the parameters. If the order of the
input buffers matches the order of the placeholders in the SQL statement, then you can just use
InOrder
as the mapping.
Then using array input parameters to determine the values of placeholders in an SQL statement to be executed the indices of the placeholders and the column buffers may differ. For starters the column buffer indices are zero based, thereas the parameter indices are one based. On top of that more complex mappings can emerge if the same input buffer should be reused to fill in for multiple placeholders. In case the same value would appear in the query twice.