Get an index by field name.
(&self, field: &str)
| 283 | |
| 284 | /// Get an index by field name. |
| 285 | pub fn get_index(&self, field: &str) -> Option<&KvFieldIndex> { |
| 286 | self.indexes.iter().find(|i| i.field == field) |
| 287 | } |
| 288 | |
| 289 | /// Add a composite index on multiple fields. Returns false if already exists. |
| 290 | pub fn add_composite_index( |