MCPcopy Create free account
hub / github.com/NodeDB-Lab/nodedb / insert

Method insert

nodedb/src/control/state/collection_to_database.rs:48–53  ·  view source on GitHub ↗

Register a collection-to-database mapping.

(&self, tenant_id: TenantId, collection: Arc<str>, db_id: DatabaseId)

Source from the content-addressed store, hash-verified

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) {

Callers 15

defineMethod · 0.45
load_fromMethod · 0.45
create_roleMethod · 0.45
set_quotaMethod · 0.45
mfa_required_passesFunction · 0.45
device_trustFunction · 0.45
start_impersonationMethod · 0.45
delegateMethod · 0.45
registerMethod · 0.45
manual_serial_checkFunction · 0.45

Calls 1

writeMethod · 0.45

Tested by 15

mfa_required_passesFunction · 0.36
device_trustFunction · 0.36
manual_serial_checkFunction · 0.36
cycle_detectionFunction · 0.36
expired_key_rejectedFunction · 0.36
test_claimsFunction · 0.36
claim_sync_updates_emailFunction · 0.36