summaryrefslogtreecommitdiff
path: root/internal/storage/db.go
AgeCommit message (Collapse)Author
2026-04-14docs: add godoc for exports (ask 04)Paul Buetow
Document Record, Open, CreateSchema, ResetRecords, ImportFromDir, LoadRecords in storage; Reporter and reporters in goprecords; Fields and Parse in recordline; Config and Run in daemon. Made-with: Cursor
2026-04-14fix: shadowing, version.Tag, prealloc LoadRecords (ask 54)Paul Buetow
- CreateKey: avoid shadowing named return err on rand.Read - daemon Run: rename slog logger to slogLog vs stdlib log package - version: rename Version to Tag to avoid version.Version stutter - LoadRecords: COUNT(*) then make slice with capacity Made-with: Cursor
2026-04-14refactor: use fs.FS for aggregate and DB import (ask v3)Paul Buetow
Decouple Aggregator and ImportFromDir from direct os.Open by routing through io/fs: NewAggregatorFS, ImportFromFS, recordsdir.ListNonEmptyFilesFS. NewAggregator and ImportFromDir wrap os.DirFS for backward compatibility. Add fstest.MapFS tests for recordsdir, aggregate, and ImportFromFS. Made-with: Cursor
2026-04-14refactor: share .records file discovery (ask u3)Paul Buetow
Extract ListNonEmptyFiles and HostFromFileName into internal/recordsdir for aggregate and storage ImportFromDir. Behavior unchanged. Made-with: Cursor
2026-04-14n3: validate SQLite with PingContext after OpenPaul Buetow
Call db.PingContext in storage.Open and authkeys.OpenStore; close DB and return wrapped errors on failure. Add tests for canceled context and invalid directory path. Made-with: Cursor
2026-04-14refactor: extract record line parser to internal/recordline (m3)Paul Buetow
Deduplicate parseRecordLine from goprecords and storage; shared recordline.Parse with Fields type. Tests live in recordline package; DB import path still covered by goprecords TestImportFromDir. Made-with: Cursor
2026-03-03refactor(context): propagate context through db open and io scans (task 333)Paul Buetow
2026-03-03refactor(storage): separate DB operations into storage package (task 334)Paul Buetow