MCPcopy Create free account
hub / github.com/TheSecuredAnalyst/security-suite / get_db

Function get_db

core/db.py:46–53  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

44
45@contextmanager
46def get_db() -> Generator[sqlite3.Connection, None, None]:
47 conn = _get_connection()
48 try:
49 yield conn
50 conn.commit()
51 except Exception:
52 conn.rollback()
53 raise
54
55
56def init_db() -> None:

Callers 12

init_dbFunction · 0.85
upsert_runFunction · 0.85
get_runFunction · 0.85
list_runsFunction · 0.85
upsert_findingFunction · 0.85
list_findingsFunction · 0.85
list_confirmed_findingsFunction · 0.85
insert_remediationFunction · 0.85
list_remediationsFunction · 0.85
get_statsFunction · 0.85
get_risk_trendFunction · 0.85
get_exposure_trendFunction · 0.85

Calls 2

_get_connectionFunction · 0.85
rollbackMethod · 0.80

Tested by

no test coverage detected