From 80bd9b59a49c3afae5156a1ef565f0c40763d6a7 Mon Sep 17 00:00:00 2001 From: Virgil Date: Sat, 4 Apr 2026 10:40:37 +0000 Subject: [PATCH] docs(journal): sharpen query usage examples Co-Authored-By: Virgil --- journal.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/journal.go b/journal.go index 05b88f2..e26088d 100644 --- a/journal.go +++ b/journal.go @@ -95,9 +95,8 @@ func (storeInstance *Store) CommitToJournal(measurement string, fields map[strin } } -// Usage example: `result := storeInstance.QueryJournal(\`from(bucket: "store") |> range(start: -24h)\`)` -// The query accepts Flux-shaped filters or a raw SQL statement against the -// journal tables. +// Usage example: `result := storeInstance.QueryJournal(\`from(bucket: "events") |> range(start: -24h) |> filter(fn: (r) => r.workspace == "session-a")\`)` +// Usage example: `result := storeInstance.QueryJournal("SELECT measurement, committed_at FROM journal_entries ORDER BY committed_at")` func (storeInstance *Store) QueryJournal(flux string) core.Result { if err := storeInstance.ensureReady("store.QueryJournal"); err != nil { return core.Result{Value: err, OK: false}