use std::sync::Arc;
use crate::control::security::catalog::function_types::StoredFunction;
use crate::control::state::SharedState;
pub fn put(func: StoredFunction, shared: Arc<SharedState>) {
shared.block_cache.clear();
super::owner::install_from_parent("function", func.tenant_id, &func.name, &func.owner, &shared);
}
pub fn delete(tenant_id: u64, name: String, shared: Arc<SharedState>) {
shared.block_cache.clear();
shared
.permissions
.install_replicated_remove_owner("function", tenant_id, &name);
}