We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 50d9ed8 commit 64a7b1cCopy full SHA for 64a7b1c
1 file changed
src/registry.rs
@@ -312,6 +312,17 @@ impl USearchRegistry {
312
.cloned()
313
}
314
315
+ /// Remove all registry entries whose name starts with `prefix`.
316
+ ///
317
+ /// Use `"conn::schema::table::"` to evict all columns for one table,
318
+ /// or `"conn::"` to evict all tables for a connection.
319
+ pub fn remove_by_prefix(&self, prefix: &str) {
320
+ self.tables
321
+ .write()
322
+ .expect("USearchRegistry lock poisoned")
323
+ .retain(|k, _| !k.starts_with(prefix));
324
+ }
325
+
326
pub fn into_arc(self) -> Arc<Self> {
327
Arc::new(self)
328
0 commit comments