(db_path: Path)
| 62 | |
| 63 | |
| 64 | def 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 | |
| 75 | def build_profile_from_role(role_name: str, role_data: Dict[str, Any]) -> Dict[str, Any]: |