Expand description
Queries over a built index: what to select, which roll-ups to report, and the value grammars both are written in.
The module is deliberately free of filesystem access and of the cli feature. A query
is a pure function of an Index and a request, so the CLI, the Rust
API, and the Python bindings all compose the same types rather than reimplementing
selection three times — and so a report can never quietly become a producer of state.
Structs§
- Axis
Names - What the calling surface calls the knobs a report’s diagnostics name.
- Basis
- What a retained index or an opened root holds for its lifetime.
- Candidate
- The facts about one entry that selection examines.
- Code
Language Row - Complete measured contribution of one detected code language.
- Code
Overview - Code-first projection with explicit coverage and display omissions.
- Code
Tally - Code measurements for one selected file population.
- Content
Report Metadata - Analyzer identity attached to a content-capable report.
- Delivery
- How a request is carried out, which never changes what its answer says.
- Entry
Selection - Additive selection for portable opened-root entry projections.
- FileRow
- One matching entry in a flat view. Directory size and mtime describe its subtree after exclusions; other entries carry their own metadata. Nested rows may overlap.
- Ignored
Size - Exact ignored byte sizes on a disjoint omitted subtree. Directory inode usage is not part of either size metric.
- Ignored
Tally - The part of a row’s tallies that
.gitignorerules ignore. - Metric
Row - One stable group in a metric-summary section.
- Metric
Share - Exact share represented as an integer fraction.
- Metric
Summary - Totals and grouped rows for types, families, languages, or documents.
- Modified
Window - An inclusive-start, exclusive-end window over modification times, in nanoseconds.
- Pages
- Derived page inputs, absent unless the words unit was requested.
- Pattern
- A compiled glob pattern.
- Query
- What a report was asked for.
- Read
Spec - What one read supplies, as its caller wrote it: the
Queryhalf of a request. - Report
- A rendered answer: provenance, plus one section per requested view.
- Report
Metric Values - One stable group in a metric-summary section.
- Report
Provenance - How and when the coherent answer was produced.
- Request
- Everything that determines an answer.
- Request
Defaults - Every default a request takes when its caller names nothing, stated once.
- Request
Spec - A request as a caller wrote it: raw values, before any grammar has read them.
- Scope
- Semantic filesystem scope, independent of scheduling and batching.
- Selection
- Which retained entries a query considers, and how its results are shaped.
- Share
Threshold - An exact decimal percentage used only to select displayed rows.
- Summary
Row - The aggregate row of a summary view.
- Tier
Provenance - Provenance of each tier contributing to a report.
- Tier
State - Source and currency of one retained tier.
- Tree
Display Limits - Resolved, independent display bounds for one hierarchical section.
- Tree
Node - One directory’s row in a tree view.
- Tree
Omission - A disjoint group of direct child subtrees omitted by one display bound.
- Tree
Remainder - Content not represented by a listed row in a projected tree, shared by every format.
The root gives context; each displayed direct child represents its entire recursive
subtree, even where expansion below that child is bounded. Only the root’s immediate
omission boundaries contribute, or the omitted root when no root row is shown.
Unknown or overflowing constituents propagate as
None. - Tree
Status - Completeness of the facts used to answer one report.
- TypeRow
- One extension’s row in a types view.
- Watch
Delivery - How a watch repeats its answer.
- Workers
- Operational worker limits. Zero analysis workers selects available parallelism.
Enums§
- Bound
- A bound that may be unlimited.
- Ignored
Entries - Which entries a query considers by their
.gitignoreclassification. - Metric
Group - Dimension used by a generic metric-summary section.
- Report
Source - Which tier of the freshness ladder produced the index behind a report.
- Request
Error - Why a request cannot be answered as asked.
- Scope
Axis - A scan-scope axis a build may be unable to honour at all.
- Section
- One view’s results.
- Share
Metric - Metric used as the numerator and denominator of grouped percentages.
- Size
Metric - Which size metric a report answers in.
- SortKey
- Which key results are ordered by.
- Tree
Omission Reason - Which independent display bound first removed a tree subtree.
- View
Spec - Which roll-up or listing a view reports.
Functions§
- bound_
nanos - Convert a parsed time bound to index nanoseconds, or refuse the value.
- document_
words - Derive the selected document volume only after every sufficient statistic is added.
- format_
rfc3339 - Render an instant as an RFC 3339 timestamp in UTC, with nanosecond precision.
- pages
- Build page inputs only when document words were measured.
- parse_
bound - Parse a bound that accepts
allfor unbounded, as--depthand--limitare written. - parse_
cache_ policy - Parse a cache policy:
auto,on, oroff. - parse_
control_ budget - Parse a control budget: a
parse_sizevalue, orallfor no bound. - parse_
control_ line_ limit - Parse a control line limit: a
parse_sizevalue, orallfor no bound. - parse_
kind - Parse one entry kind:
file,dir,symlink, orother. - parse_
kinds - Parse a comma-separated list of entry kinds.
- parse_
size - Parse a
SIZEvalue into a byte count. - parse_
size_ metric - Parse a size metric:
allocatedorapparent. - parse_
sort - Parse a metadata ordering key or a registered numeric content metric.
- parse_
when - Parse a
WHENvalue into an absolute instant. - report
- Build a report from an index.
- system_
time_ to_ nanos - Convert an instant to nanoseconds since the Unix epoch, negative before it.