MCPcopy Create free account
hub / github.com/diillson/chatcli / SQLiteStore

Struct SQLiteStore

server/hub/sqlite_store.go:73–77  ·  view source on GitHub ↗

SQLiteStore is the WAL-backed implementation of Store. It is safe for concurrent use: reads go through the connection pool, writes are serialized by wmu so the embedded single-writer never returns SQLITE_BUSY to callers.

Source from the content-addressed store, hash-verified

71// concurrent use: reads go through the connection pool, writes are serialized
72// by wmu so the embedded single-writer never returns SQLITE_BUSY to callers.
73type SQLiteStore struct {
74 db *sql.DB
75 logger *zap.Logger
76 wmu sync.Mutex // serializes writes
77}
78
79// OpenSQLiteStore opens (creating if needed) the Hub database at path with WAL
80// journaling and runs migrations. A nil logger is replaced with a no-op.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected