Documentation
¶
Overview ¶
Package store owns phpbotscout's single SQLite database.
Index and state share one database: FTS5 for BM25 retrieval, ordinary tables for everything else — sources, documents, and in later phases the audit trail, escalation links and feedback. One daemon means one writer, so SQLite's headline weakness does not apply, and keeping the index in the same transactional store as the state it cites is worth more than the concurrency nobody needs.
The driver is pure Go. R-OPS-26 permitted cgo with the native driver and named modernc.org/sqlite as a fallback; the fallback ships FTS5 with BM25 and column weighting, so CGO_ENABLED=0 stays and cross-compilation stays free.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrMigrationsUnordered = errors.New("store: migrations are not in ascending version order")
ErrMigrationsUnordered is returned when migrations are not in ascending version order. Applying 3 before 2 leaves a schema nobody can reason about, so it is refused rather than sorted silently — the ordering is a property of the source, and quietly fixing it hides a mistake worth seeing.
Functions ¶
This section is empty.
Types ¶
type DB ¶
type DB struct {
// contains filtered or unexported fields
}
DB is the open database.
func OpenWith ¶
OpenWith opens the database and applies the given migrations. Exported so the migration machinery can be tested against deliberately broken input, which is the only way to know a failure leaves the schema intact.