Documentation
¶
Overview ¶
Package dashboardquery evaluates Dashboard Language for local SQLite consumers. Hosted PostgreSQL execution remains independently SQL-backed.
Index ¶
- Constants
- func CompareRecordKeys(left, right any) int
- func Execute(ctx context.Context, definition map[string]any, ...) ([]map[string]any, error)
- func OperationalValueEvidenceMetadata(packets []map[string]any) (map[string]any, error)
- func OperationalValueEvidenceRows(packets []map[string]any) ([]map[string]any, error)
- func ParseDate(value any) (float64, bool)
- func ReadCollection(ctx context.Context, db SnapshotReader, collection string, maxRows int, ...) (result []map[string]any, err error)
- func ReadCollectionFields(ctx context.Context, db SnapshotReader, collection string, fields []string, ...) (result []map[string]any, err error)
- func String(value any) string
- func ValidRecordKey(key any) bool
- type Evaluator
- type NativeQueryCancelledError
- type NativeQueryUnavailableError
- type SnapshotReader
Constants ¶
const DatabaseName = "gh-aw-cao-dashboard-data"
const DatabaseVersion = 43
Variables ¶
This section is empty.
Functions ¶
func CompareRecordKeys ¶
func Execute ¶
func Execute(ctx context.Context, definition map[string]any, load func(string) ([]map[string]any, error)) ([]map[string]any, error)
Execute evaluates one declarative definition with bounded, cancelable work. The loader owns source authorization and dependency resolution.
func OperationalValueEvidenceMetadata ¶
OperationalValueEvidenceMetadata preserves evidence clocks without promoting incomplete acquisition or old captures to complete/fresh observations.
func OperationalValueEvidenceRows ¶
OperationalValueEvidenceRows only projects acquired facts. Report computation belongs to the declarative query plan, never the storage adapter.
func ReadCollection ¶
func ReadCollection(ctx context.Context, db SnapshotReader, collection string, maxRows int, maxBytes int64) (result []map[string]any, err error)
ReadCollection preserves canonical IndexedDB key order and omits storage-only fields. Positive limits bound allocation before materializing a collection.
func ReadCollectionFields ¶
func ReadCollectionFields(ctx context.Context, db SnapshotReader, collection string, fields []string, maxRows int, maxBytes int64) (result []map[string]any, err error)
ReadCollectionFields projects known-live fields inside SQLite. A nil field list preserves every public field, and limits still cover full stored records.
func ValidRecordKey ¶
Types ¶
type Evaluator ¶
type Evaluator struct {
// contains filtered or unexported fields
}
Evaluator shares one deadline and operation budget across a dependency DAG. Intermediate results may reach the input-row budget; callers bound wire pages.
func NewEvaluator ¶
func NewEvaluatorWithLimits ¶
func NewEvaluatorWithLimits(ctx context.Context, inputRows int, operations int64) (*Evaluator, error)
NewEvaluatorWithLimits admits larger local snapshots without changing the default CLI limits or the caller's independent wire and memory budgets.
func (*Evaluator) Operations ¶
type NativeQueryCancelledError ¶
func (*NativeQueryCancelledError) Error ¶
func (e *NativeQueryCancelledError) Error() string
func (*NativeQueryCancelledError) Unwrap ¶
func (e *NativeQueryCancelledError) Unwrap() error
type NativeQueryUnavailableError ¶
type NativeQueryUnavailableError struct {
}
NativeQueryUnavailableError distinguishes unavailable evidence or an invalid declarative plan from a successful query over an empty collection.
func (*NativeQueryUnavailableError) Error ¶
func (e *NativeQueryUnavailableError) Error() string
func (*NativeQueryUnavailableError) Unwrap ¶
func (e *NativeQueryUnavailableError) Unwrap() error