[agent/codex:gpt-5.4-mini] Read ~/spec/code/core/go/store/RFC.md fully. Find features d... #129
3 changed files with 5 additions and 2 deletions
|
|
@ -256,7 +256,7 @@ transaction.go Store.Transaction and transaction-scoped mutation helpers
|
|||
events.go EventType, Event, Watch, Unwatch, OnChange, notify
|
||||
scope.go ScopedStore, QuotaConfig, namespace-local helper delegation, quota enforcement
|
||||
journal.go Journal persistence, Flux-like querying, JSON row inflation
|
||||
workspace.go Workspace buffers, aggregation, commit flow, orphan recovery
|
||||
workspace.go Workspace buffers, aggregation, query analysis, commit flow, orphan recovery
|
||||
compact.go Cold archive generation to JSONL gzip or zstd
|
||||
store_test.go Tests: CRUD, TTL, concurrency, edge cases, persistence
|
||||
events_test.go Tests: Watch, Unwatch, OnChange, event dispatch
|
||||
|
|
|
|||
|
|
@ -122,7 +122,7 @@ The entire package lives in a single Go package (`package store`) with the follo
|
|||
| `events.go` | `EventType` constants, `Event` struct, `Watch`/`Unwatch` channel subscriptions, `OnChange` callback registration, internal `notify` dispatch |
|
||||
| `scope.go` | `ScopedStore` wrapper for namespace isolation, `QuotaConfig` struct, `NewScoped`/`NewScopedWithQuota` constructors, namespace-local helper delegation, quota enforcement logic |
|
||||
| `journal.go` | Journal persistence, Flux-like querying, JSON row inflation, journal schema helpers |
|
||||
| `workspace.go` | Workspace buffers, aggregation, commit flow, and orphan recovery |
|
||||
| `workspace.go` | Workspace buffers, aggregation, query analysis, commit flow, and orphan recovery |
|
||||
| `compact.go` | Cold archive generation to JSONL gzip or zstd |
|
||||
|
||||
Tests are organised in corresponding files:
|
||||
|
|
|
|||
|
|
@ -318,6 +318,9 @@ func (workspace *Workspace) Discard() {
|
|||
_ = workspace.closeAndRemoveFiles()
|
||||
}
|
||||
|
||||
// Query runs SQL against the buffer for ad-hoc analysis and returns rows as
|
||||
// `[]map[string]any`.
|
||||
//
|
||||
// Usage example: `result := workspace.Query("SELECT entry_kind, COUNT(*) AS count FROM workspace_entries GROUP BY entry_kind")`
|
||||
func (workspace *Workspace) Query(query string) core.Result {
|
||||
if err := workspace.ensureReady("store.Workspace.Query"); err != nil {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue