| 2286 | /// In this version, the [`IndexSchema`] is looked up in `schema` based on `index_id`. |
| 2287 | #[cold] |
| 2288 | fn build(schema: &TableSchema, index: &TableIndex, index_id: IndexId, value: AlgebraicValue) -> Self { |
| 2289 | let index_schema = schema.indexes.iter().find(|i| i.index_id == index_id).unwrap(); |
| 2290 | Self::build_with_index_schema(schema, index, index_schema, value) |
| 2291 | } |
| 2292 | |
| 2293 | /// Returns a unique constraint violation error for the given `index` |
| 2294 | /// and the `value` that would have been duplicated. |