MCPcopy Create free account
hub / github.com/ImGoodBai/MapGoGoGo / connect

Function connect

backend/app/db.py:19–27  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

17
18
19def connect() -> sqlite3.Connection:
20 path = db_path()
21 path.parent.mkdir(parents=True, exist_ok=True)
22 conn = sqlite3.connect(path)
23 conn.row_factory = sqlite3.Row
24 conn.execute("PRAGMA foreign_keys = ON")
25 conn.execute("PRAGMA journal_mode = WAL")
26 conn.execute("PRAGMA busy_timeout = 5000")
27 return conn
28
29
30def init_db() -> None:

Callers 11

init_dbFunction · 0.85
update_meFunction · 0.85
list_challengesFunction · 0.85
create_challengeFunction · 0.85
get_challengeFunction · 0.85
leaderboardFunction · 0.85
unlock_cellsFunction · 0.85
submit_positionFunction · 0.85
admin_summaryFunction · 0.85
update_statusFunction · 0.85

Calls 1

db_pathFunction · 0.85

Tested by

no test coverage detected