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.
| 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. |
| 73 | type 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. |
nothing calls this directly
no outgoing calls
no test coverage detected