Returns a new [`TableIndex`] for `table`.
(&self, algo: &IndexAlgorithm, is_unique: bool)
| 1421 | |
| 1422 | /// Returns a new [`TableIndex`] for `table`. |
| 1423 | pub fn new_index(&self, algo: &IndexAlgorithm, is_unique: bool) -> Result<TableIndex, InvalidFieldError> { |
| 1424 | TableIndex::new( |
| 1425 | self.get_schema().get_row_type(), |
| 1426 | algo.columns().to_owned(), |
| 1427 | IndexKind::from_algo(algo), |
| 1428 | is_unique, |
| 1429 | ) |
| 1430 | } |
| 1431 | |
| 1432 | /// Inserts a new `index` into the table. |
| 1433 | /// |