query

package
v0.0.0-...-f2098ea Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 16, 2026 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(args []string) error

Run parses args and executes the query subcommand, writing results to stdout.

func RunTo

func RunTo(args []string, stdout, stderr io.Writer) error

RunTo is Run with explicit output writers, for testability.

Types

type Filters

type Filters struct {
	Ticket        string
	Runtime       string
	Status        string
	ExitReason    string
	RunID         string
	Since         string // RFC3339
	Until         string // RFC3339
	HasFiles      string // glob pattern
	Branch        string
	CaptureMethod string // "hooks" | "import"
}

Filters holds the AND-combined query criteria. An empty string (or nil-ish zero value) means the corresponding filter is unset and matches everything.

func (Filters) Match

func (f Filters) Match(s *schema.Session) bool

Match reports whether s satisfies every set filter. Unset filters are skipped. Filters AND together: a session must satisfy all of them to match.

type QueryStats

type QueryStats struct {
	Source   string
	RefShows int
}

QueryStats reports how a query was served, for testing and diagnostics. Source is "index" when the materialized index was used, "refs" when the ref-walk fallback ran. RefShows counts session.json blobs read via git show.

func RunToWithStats

func RunToWithStats(args []string, stdout, stderr io.Writer) (QueryStats, error)

RunToWithStats is RunTo that also returns how the query was served.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL