MCPcopy Create free account
hub / github.com/OpenRaiser/PaperFlow / clear_profiles_only

Function clear_profiles_only

scripts/init_profiles_from_roles.py:64–72  ·  view source on GitHub ↗
(db_path: Path)

Source from the content-addressed store, hash-verified

62
63
64def clear_profiles_only(db_path: Path) -> int:
65 conn = sqlite3.connect(db_path)
66 cursor = conn.cursor()
67 cursor.execute("SELECT COUNT(*) FROM profiles")
68 before_count = int(cursor.fetchone()[0] or 0)
69 cursor.execute("DELETE FROM profiles")
70 conn.commit()
71 conn.close()
72 return before_count
73
74
75def build_profile_from_role(role_name: str, role_data: Dict[str, Any]) -> Dict[str, Any]:

Callers 1

mainFunction · 0.85

Calls 3

cursorMethod · 0.80
executeMethod · 0.45
closeMethod · 0.45

Tested by

no test coverage detected