Register a collection-to-database mapping.
(&self, tenant_id: TenantId, collection: Arc<str>, db_id: DatabaseId)
| 46 | |
| 47 | /// Register a collection-to-database mapping. |
| 48 | pub fn insert(&self, tenant_id: TenantId, collection: Arc<str>, db_id: DatabaseId) { |
| 49 | self.inner |
| 50 | .write() |
| 51 | .unwrap_or_else(|p| p.into_inner()) |
| 52 | .insert((tenant_id, collection), db_id); |
| 53 | } |
| 54 | |
| 55 | /// Remove a collection-to-database mapping on collection drop. |
| 56 | pub fn remove(&self, tenant_id: TenantId, collection: &str) { |