Skip to main content

Module query

Module query 

Source
Expand description

Public AST types for vault queries.

Frontmatter predicates and link-graph predicates are first-class siblings in the same enum (Expr), reflecting vaultdb’s dual-structure thesis: a markdown vault is both a relational table (frontmatter) and a graph (wikilinks), and the query language treats both equally.

Structs§

Query
A complete query: the root expression, optional projection, sort, limit, and the folder to scan.
SortKey
A sort key: which field to sort by, ascending or descending.

Enums§

CompareOp
A scalar comparison operator (used by Predicate::Compare).
Expr
A composable filter expression. The AST root for vault queries.
LinkPredicate
A predicate over the link graph: either a literal target, or a query into records satisfying a sub-expression. The Where variant is what makes joins-via-links possible (e.g., “give me all notes that link to anything tagged topic/ai”).
Predicate
A leaf predicate over a record’s frontmatter or virtual fields.