MCPcopy
hub / github.com/ModelEngine-Group/nexent / insert_config

Function insert_config

backend/database/tenant_config_db.py:68–77  ·  view source on GitHub ↗
(insert_data: Dict[str, Any])

Source from the content-addressed store, hash-verified

66
67
68def insert_config(insert_data: Dict[str, Any]):
69 with get_db_session() as session:
70 try:
71 session.add(TenantConfig(**insert_data))
72 session.commit()
73 return True
74 except SQLAlchemyError as e:
75 session.rollback()
76 logger.error(f"insert config failed, error: {e}")
77 return False
78
79
80def delete_config_by_tenant_config_id(tenant_config_id: int):

Callers 7

set_single_configMethod · 0.90
create_tenantFunction · 0.90
update_tenant_infoFunction · 0.90

Calls 6

get_db_sessionFunction · 0.90
TenantConfigClass · 0.90
commitMethod · 0.80
rollbackMethod · 0.80
errorMethod · 0.80
addMethod · 0.45

Tested by 2