MCPcopy Create free account
hub / github.com/Ishabdullah/Codey-v2 / __init__

Method __init__

core/state.py:38–49  ·  view source on GitHub ↗
(self, db_path: Path = STATE_DB)

Source from the content-addressed store, hash-verified

36 """
37
38 def __init__(self, db_path: Path = STATE_DB):
39 self.db_path = db_path
40 self._lock = Lock()
41 self._conn: sqlite3.Connection = sqlite3.connect(
42 str(self.db_path),
43 timeout=30.0,
44 check_same_thread=False,
45 )
46 self._conn.row_factory = sqlite3.Row
47 # Enable WAL mode for better concurrent read performance
48 self._conn.execute("PRAGMA journal_mode=WAL")
49 self._init_schema()
50
51 def close(self):
52 """Close the persistent connection."""

Callers

nothing calls this directly

Calls 2

_init_schemaMethod · 0.95
executeMethod · 0.80

Tested by

no test coverage detected