VaultMD / WhereCondition
Type Alias: WhereCondition
WhereCondition =
object
Defined in: src/query/models/where-map.ts:19
The operator form of a WhereMap entry. Every operator present is applied, AND-ed together, so { gte: 1, lt: 10 } is a half-open range.
Example
// due before August, and not already done
vault.query.queryNotes({
where: { due: { lt: '2026-08-01' }, status: { ne: 'done' } },
});Properties
exists?
optionalexists?:boolean
Defined in: src/query/models/where-map.ts:44
Whether the field is present at all. false selects notes that lack the field; a field explicitly set to null counts as absent.
gt?
optionalgt?:WhereValue
Defined in: src/query/models/where-map.ts:35
Greater than.
gte?
optionalgte?:WhereValue
Defined in: src/query/models/where-map.ts:37
Greater than or equal.
in?
optionalin?:WhereValue[]
Defined in: src/query/models/where-map.ts:39
Set membership. An empty list matches nothing.
lt?
optionallt?:WhereValue
Defined in: src/query/models/where-map.ts:31
Less than.
lte?
optionallte?:WhereValue
Defined in: src/query/models/where-map.ts:33
Less than or equal.
ne?
optionalne?:WhereValue
Defined in: src/query/models/where-map.ts:29
Not equal. A note missing the field matches, since "unset" is not the value — pair with exists: true to require the field as well.
Match the operand's type to the stored one. SQLite holds values of different types to be never equal, so { ne: '5' } against a numeric field excludes nothing and quietly returns every note — where the same mismatch on equality or a range would return an obvious empty result.