Query modes
DQL supports four output modes.- TABLE returns tabular results with the fields you specify.
- LIST returns a flat list of matching page paths.
- COUNT returns the number of matching pages.
- DISTINCT returns unique values for a single field.
Clauses
Implicit fields
Every page exposes these fields without any frontmatter:Expressions
DQL supports arithmetic, function calls, string interpolation, comparisons, and boolean logic insideWHERE and computed field definitions.
Built-in functions
DQL ships with 27 functions:Date and time
Date and time
now(), date(), duration(), days_since(), format()String
String
lower(), upper(), trim(), split(), join(), contains(), regextest()Math
Math
round(), floor(), ceil(), abs(), min(), max()Collection
Collection
len(), sum(), avg(), first(), last(), sort(), reverse(), unique()Metadata
Metadata
meta() — access implicit fields programmatically.CLI usage
Run a DQL query from the command line:REST API
Run a DQL query over HTTP:Aggregation
Use theaggregate command to group and summarize metadata:
count, avg, sum, min, max. You can group by any frontmatter field.
Computed views
A markdown file withkiwi-view: true in its frontmatter becomes a computed view. KiwiFS auto-refreshes the file body from a DQL query embedded in the frontmatter.
Computed frontmatter fields
You can define virtual fields in.kiwi/config.toml that are evaluated at index time. These fields are queryable like any other frontmatter field.
Computed fields are recalculated on every reindex. They do not modify your source files.