[agent/codex:gpt-5.4-mini] Read ~/spec/code/core/go/store/RFC.md fully. Find features d... #122

Merged
Virgil merged 1 commit from agent/read---spec-code-core-go-store-rfc-md-fu into dev 2026-04-04 10:33:39 +00:00
3 changed files with 6 additions and 6 deletions

View file

@ -116,7 +116,7 @@ func (storeInstance *Store) Compact(options CompactOptions) core.Result {
}()
for _, entry := range archiveEntries {
lineMap, err := compactArchiveLine(entry)
lineMap, err := archiveEntryLine(entry)
if err != nil {
return core.Result{Value: err, OK: false}
}
@ -167,7 +167,7 @@ func (storeInstance *Store) Compact(options CompactOptions) core.Result {
return core.Result{Value: outputPath, OK: true}
}
func compactArchiveLine(entry compactArchiveEntry) (map[string]any, error) {
func archiveEntryLine(entry compactArchiveEntry) (map[string]any, error) {
fields := make(map[string]any)
fieldsResult := core.JSONUnmarshalString(entry.fieldsJSON, &fields)
if !fieldsResult.OK {

View file

@ -116,7 +116,7 @@ func (storeInstance *Store) QueryJournal(flux string) core.Result {
return storeInstance.queryJournalRows(trimmedQuery)
}
selectSQL, arguments, err := storeInstance.queryJournalFlux(trimmedQuery)
selectSQL, arguments, err := storeInstance.queryJournalFromFlux(trimmedQuery)
if err != nil {
return core.Result{Value: err, OK: false}
}
@ -145,7 +145,7 @@ func (storeInstance *Store) queryJournalRows(query string, arguments ...any) cor
return core.Result{Value: inflateJournalRows(rowMaps), OK: true}
}
func (storeInstance *Store) queryJournalFlux(flux string) (string, []any, error) {
func (storeInstance *Store) queryJournalFromFlux(flux string) (string, []any, error) {
queryBuilder := core.NewBuilder()
queryBuilder.WriteString("SELECT bucket_name, measurement, fields_json, tags_json, committed_at, archived_at FROM ")
queryBuilder.WriteString(journalEntriesTableName)

View file

@ -319,12 +319,12 @@ func (workspace *Workspace) Discard() {
}
// Usage example: `result := workspace.Query("SELECT entry_kind, COUNT(*) AS count FROM workspace_entries GROUP BY entry_kind")`
func (workspace *Workspace) Query(sqlQuery string) core.Result {
func (workspace *Workspace) Query(query string) core.Result {
if err := workspace.ensureReady("store.Workspace.Query"); err != nil {
return core.Result{Value: err, OK: false}
}
rows, err := workspace.workspaceDatabase.Query(sqlQuery)
rows, err := workspace.workspaceDatabase.Query(query)
if err != nil {
return core.Result{Value: core.E("store.Workspace.Query", "query workspace", err), OK: false}
}