Build the storage key for an R-tree checkpoint. Format: `{collection}\0{field}\0rtree`
(collection: &str, field: &str)
| 226 | /// |
| 227 | /// Format: `{collection}\0{field}\0rtree` |
| 228 | pub fn rtree_storage_key(collection: &str, field: &str) -> Vec<u8> { |
| 229 | let mut key = Vec::with_capacity(collection.len() + field.len() + 8); |
| 230 | key.extend_from_slice(collection.as_bytes()); |
| 231 | key.push(0); |
| 232 | key.extend_from_slice(field.as_bytes()); |
| 233 | key.push(0); |
| 234 | key.extend_from_slice(b"rtree"); |
| 235 | key |
| 236 | } |
| 237 | |
| 238 | /// Build the storage key for spatial index metadata. |
| 239 | /// |