Skip to content

VaultMD / WhereMap

Type Alias: WhereMap

WhereMap = Record<string, WhereValue | WhereCondition>

Defined in: src/query/models/where-map.ts:70

A map of frontmatter field names to filters used by QueryApi.queryNotes and QueryApi.countNotes. All entries are combined with AND semantics.

A bare value is an equality test; a WhereCondition object opens up ranges, set membership, negation and presence tests. Comparisons run over the indexed frontmatter JSON, so they follow SQLite's type ordering: compare strings with strings and numbers with numbers (ISO dates sort correctly as strings).

Example

ts
vault.query.queryNotes({
  where: {
    status: 'open',                  // equality
    due: { lt: '2026-08-01' },       // range
    kind: { in: ['note', 'ref'] },   // set membership
    archived: { exists: false },     // field absent
  },
});