Skip to main content

Module select

Module select 

Source
Expand description

Selecting the documents a view covers: scope, then conditions.

This is the half that touches the workspace. It answers one question — which documents does this view cover? — and answers it as a flat, deduplicated set in path order. How those documents become groups is group, which is a pure function over what this returns.

The split is what makes a Selection worth having as a value: one selection can be grouped several ways, and every grouping question is testable without a filesystem.

§Scope is a traversal, not a path filter

A view’s under is resolved by walking the spanning relation below the anchor it names, never by matching a path prefix or a title. That is the difference between a view and a saved search: path starts-with "Daily/" breaks the moment someone renames the folder, and matching an index titled 2026 finds the one under Trips/ just as happily as the one under Daily/. A traversal survives a rename, a move and a retitle, because it follows the same declarations that make the workspace a workspace.

The scope is the whole subtree below the anchor, not its direct children — see the inheritance note in crate::spec.

Structs§

Row
One document a view covers.
Selection
The documents a view covers: in scope, past its conditions, deduplicated, ordered by path.

Functions§

select
Select the documents spec covers, walking from root_doc.