Skip to main content

Module query

Module query 

Source
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§

AxisNames
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.
CodeLanguageRow
Complete measured contribution of one detected code language.
CodeOverview
Code-first projection with explicit coverage and display omissions.
CodeTally
Code measurements for one selected file population.
ContentReportMetadata
Analyzer identity attached to a content-capable report.
Delivery
How a request is carried out, which never changes what its answer says.
EntrySelection
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.
IgnoredSize
Exact ignored byte sizes on a disjoint omitted subtree. Directory inode usage is not part of either size metric.
IgnoredTally
The part of a row’s tallies that .gitignore rules ignore.
MetricRow
One stable group in a metric-summary section.
MetricShare
Exact share represented as an integer fraction.
MetricSummary
Totals and grouped rows for types, families, languages, or documents.
ModifiedWindow
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.
ReadSpec
What one read supplies, as its caller wrote it: the Query half of a request.
Report
A rendered answer: provenance, plus one section per requested view.
ReportMetricValues
One stable group in a metric-summary section.
ReportProvenance
How and when the coherent answer was produced.
Request
Everything that determines an answer.
RequestDefaults
Every default a request takes when its caller names nothing, stated once.
RequestSpec
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.
ShareThreshold
An exact decimal percentage used only to select displayed rows.
SummaryRow
The aggregate row of a summary view.
TierProvenance
Provenance of each tier contributing to a report.
TierState
Source and currency of one retained tier.
TreeDisplayLimits
Resolved, independent display bounds for one hierarchical section.
TreeNode
One directory’s row in a tree view.
TreeOmission
A disjoint group of direct child subtrees omitted by one display bound.
TreeRemainder
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.
TreeStatus
Completeness of the facts used to answer one report.
TypeRow
One extension’s row in a types view.
WatchDelivery
How a watch repeats its answer.
Workers
Operational worker limits. Zero analysis workers selects available parallelism.

Enums§

Bound
A bound that may be unlimited.
IgnoredEntries
Which entries a query considers by their .gitignore classification.
MetricGroup
Dimension used by a generic metric-summary section.
ReportSource
Which tier of the freshness ladder produced the index behind a report.
RequestError
Why a request cannot be answered as asked.
ScopeAxis
A scan-scope axis a build may be unable to honour at all.
Section
One view’s results.
ShareMetric
Metric used as the numerator and denominator of grouped percentages.
SizeMetric
Which size metric a report answers in.
SortKey
Which key results are ordered by.
TreeOmissionReason
Which independent display bound first removed a tree subtree.
ViewSpec
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 all for unbounded, as --depth and --limit are written.
parse_cache_policy
Parse a cache policy: auto, on, or off.
parse_control_budget
Parse a control budget: a parse_size value, or all for no bound.
parse_control_line_limit
Parse a control line limit: a parse_size value, or all for no bound.
parse_kind
Parse one entry kind: file, dir, symlink, or other.
parse_kinds
Parse a comma-separated list of entry kinds.
parse_size
Parse a SIZE value into a byte count.
parse_size_metric
Parse a size metric: allocated or apparent.
parse_sort
Parse a metadata ordering key or a registered numeric content metric.
parse_when
Parse a WHEN value 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.